I want to know why is that my javascript functions won't work if my html tag is from the php script??Here's my jquery code:\[code\]$(function () {//functions don't work $('ul li:gt(4)').hide(); $('.prev').click(function() { var first = $('ul').children('li:visible:first'); first.prevAll(':lt(5)').show(); first.prev().nextAll().hide() }); $('.next').click(function() { var last = $('ul').children('li:visible:last'); last.nextAll(':lt(5)').show(); last.next().prevAll().hide(); });//end of functions don't work $('.load').click(function() { $.ajax({ url: 'load.php', success:function(data){ $('#paging-container').html(data); } }); });});\[/code\]Here's my html code:\[code\]<input class="load" type="button" value="http://stackoverflow.com/questions/12749139/Load"><div id="paging-container"></div>\[/code\]And here's my php script:\[code\] <?php echo '<ul>'; for($i=1;$i<=50;$i++){ echo '<li>'.$i.'</li>'; }echo '</ul><a class="prev">prev</a> | <a class="next">next</a>';?>\[/code\]