http://stackoverflow.com/questions/19873131/jquery-pagebeforeshow-event-binding-multiple-times
$(document).on("pagebeforeshow", "#Newpage", function (event) { $(".newtext").change( function() { dostuff(); });
});
Now the problem is every time the NewPage is loaded , the binding of
$(".newtext").change( function() occurs and it is triggered multiple times
每次进页面,都增加一个事件处理,导致越来越多。 ---------------------------- try:
$(document).one("pagebeforeshow", "#Newpage", function (event)
one,只执行一次,呵呵
http://www.w3schools.com/jquery/event_one.asp
|