开发者

jqm ( jquery mobile) div refresh only one time

i've a problem i can't go through for 2 days... i'm a newbie in Jquery mobile so maybe you could quickly see the issue :

after an ajax call (to submit a form) i change div content with the ajax response, using $('confirmation').html(newcontent)

but the "new" div has not the cool jqm stylish button and content

then i added $('#confirmation').page(); it was OKAY... but it worked just for once : if i submit the form again, the jqm style dissapears...

i tried everything开发者_StackOverflow社区 i found on the net, but still no solution... so i beg your help ;)

thanks by advance to everyone who will have the kindness of having a short look !

here's my example on jsfiddle : http://jsfiddle.net/ramdam/7cwBX/17/

if you click an Submit ajax button, you'll see a nice BACK button , but if you do it twice, the button "disappears" and only show a link...


I have done some research on this topic because I am also very new to jquery mobile, and one thing I did discover (and didn't know about at all) was that while in jquery you would use $(document).ready() to execute everything when the DOM is ready, in jquery mobile it is ajax based so this is something that doesn't quite apply.

Their documentation says that we should use pageInit() instead.

http://jquerymobile.com/demos/1.0rc1/docs/api/events.html

Unfortunately making that change destroys your jsfiddle outright, but being as it deals with pages, this could be part of the problem.

I hope this helps you.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜