Is there more effective and beautiful way to reload all rules than that? Or a plugin, or something about that
$(document).ready(function(){
$('.content').load('site.php?page=start');
$(function() {
var addClickHandlers = function() {
$(".menu li").click(function() {
$(".content").load('site.php',{page: $(this).attr('name')}, function(){
$(this).show("slow");
//below goes discontent
$(".menu li").unbind('click');
addClickHandlers();
});
});
//#loadeddata is returned by request clicking .menu li (just looking if rules are reaplied)
$("#loadeddata").click(function() {$(this).color('red');});
};
addClickHandlers();
});
});
I don't like this because I have to use callbacks all the time and to unbind events that are doubling, trippling and so on while returning new data and reaplying events
$(".menu li").unbind('click');
addClickHandlers();
--
____________________________
С уважением, Марат Мамяшев
_______________________________________________ jQuery mailing list [email protected] http://jquery.com/discuss/
