jQuery Mobile modification of header not persistent -
i have simple jquery mobile site has button in header. code is:
<div data-theme="a" data-role="header" id="theheader"> <a href="/useradd" data-icon="puls" data-theme="b" data-iconpos="notext">a</a> <h1>header</h1> <a href="/usershow" data-icon="star" data-theme="b" data-iconpos="notext" id="notifybutton">x</a> </div>
now have ajax changes data-theme of notifybutton like:
setinterval(function () { $.get("/ajaxchecknotifications", function(data){ if (data != "0"){ $("#notifybutton").buttonmarkup({theme: 'c'}); }else{ $("#notifybutton").buttonmarkup({theme: 'b'}); } }); }, 2500)
this works fine when load page (f5).
but new page loaded through ajax loader theme not kept. , worse next time ajax run button not updated anymore. have tried pretty .trigger('pagecreate') getitembyid.
thank ever help.
Comments
Post a Comment