Weird DOM behavior
Weird DOM behavior
Hello everyone.
I have a big problem.
I have an html page, and in a class called 'the_content' I want to put this:
-
<div class="class_class">HELLO</div>
So what I did is:
-
$(".the_content").html('<div class="class_class">HELLO</div>');
Which is fine, BUT when writing:
-
$("class_class").click(functuin (){
//alert("something");
});
It won't alert! It seems like the browser doesn't see this class at all!
Why is this happening? How can I fix it?
Thanks, Leon.