using jquery on documents pulled with .load()
Im using the
pagination plugin and i would like to call jquery on the page that has been loaded with the plugin but cannot get it to work. for example:
the page that is pulled:
<a href="#" class="click">Click</a>
using:
$j('#hiddenresult').load('/mypage.php', null, initPagination);
i want to do:
jQuery('.click').click(function(){
alert('clicked');
});
but it doesnt work. If i include it in the file that is called using .load() then it works but i cannot use it because the file is a loop of database records so the jquery gets looped aswell. i have tried:
$j('#hiddenresult').load('/mypage.php', null, initPagination, function(){
jQuery('.click').click(function(){
alert('clicked');
});
});
but that didnt work either. Anyone have any ideas?