refreshing JQM elements in dynamic pages

  You are currently not logged in. You can view the forums, but cannot post messages. Log In | Register

15-Jan-12 12:50
I'm creating a JQM page dynamically and having trouble getting the JQM widgets to update on that page.

I know JQM offers the .element('refresh') method for various form elements, but it doesn't seem to work on the collapsible set.

Also tried to trigger the create event on the div i.e., $('#div').trigger("create") -- but no luck.

Any suggestions? Is there a way to refresh an entire page?

Thanks for any assistance!!
16-Jan-12 04:17
@sHilson: Yeah, I think JQM's 'refresh' and 'create' implementations are still a little patchy.

Try calling the page() method on the container page. That sometimes works.


$(...).page();


You can also try calling the collapsible() plugin method on the individual collapsible block(s):


$(...).collapsible();


--
Matt Doyle, Elated
3rd Edition of my jQuery Mobile book out now! Learn to build mobile web apps. Free sample chapter: http://store.elated.com/
16-Jan-12 15:08
Awesome! Works - calling .collapsible(); totally springs them to life.

Thank you very much Matt - you saved me from a very tedious and ugly work-around

Cheers!

[Edited by sHilson on 16-Jan-12 15:08]
19-Jan-12 23:38
@sHilson: Yay! Glad it worked

Cheers,
Matt

--
Matt Doyle, Elated
3rd Edition of my jQuery Mobile book out now! Learn to build mobile web apps. Free sample chapter: http://store.elated.com/

 
New posts
Old posts

Follow Elated