Unconventional problem with jQuery engine
Yesterday I started programing in jQery. Everything was all right until i start load to tags another tags from file and then want processing them. I don't know why jQuery don't want process loaded tags...
Below, I'll use shorter examles than in my web site to show what is exacly going on.
Let's say we have two files one name d.html and another z.html
Code of d.html :
-
<html>
<head>
<title>Przykład 1-1</title>
<script type="text/javascript" src="./JQ.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$('#111 .b').click(function(){
$('#111').load('z.html');
});
$('#222 .c').click(function(){
alert('something');
});
});
</script>
</head>
<body>
<p id="111">
<a class="b">Class b</a>
</p>
<p id="222">
<a class="c">Class c</a>
</p>
</body>
</html>
Code of z.html :
-
<p id="222"><a class="c">Class c</a></p>
I don't know why after loading z.html to <p id="111"> tag jQery engine don't want to process loaded tag. What is more loaded tag is same as tag in d.html which is process all the time by jQery engine.
Do you know why it doesn't work and how to fix this kind of problem?
Regards