181
rated 0 times
[
184]
[
3]
/ answers: 1 / hits: 15242
/ 12 Years ago, fri, september 7, 2012, 12:00:00
I have a page where some html is being dynamically added to the page.
This is the html and javascript that is created:
<div>
<script type=text/javascript language=javascript>
$('#btn').click(function() {
alert(Hello);
});
</script>
<a id=btn>Button</a>
</div>
Looking in my Firebug console, I get an error that says:
TypeError: $(#btn) is null
jQuery is being loaded on the page initially.
What am I doing wrong here?
More From » jquery