Refreshing jQuery Mobile listviews, buttons, select dropdowns, and input fields

Filed under: jQuery Mobile

comments (35) Views: 68,013

jQuery Mobile is an excellent framework for mobile development and you probably already know how much I love working with it. That's not to say that it doesn't have it's problems. A big pain point that many developers run into happens the minute they try to use code to add, update, or remove elements from a page using JavaScript. In this blog post I've compiled a list of jQuery Mobile widgets and the ways that you can refresh them after programmatic changes are made.

There's generally two reasons you'd ever want to refresh an element on the page. First reason is if you're adding something to the page that wasn't already there. A good example of this is a new button, or an additional checkbox. The second reason is when you make a change to an existing element: changing the selected item in a combobox, or the checked item in a radio button series. Regardless of the reason, jQuery Mobile provides a fairly consistent means by which to reload each sort of element as you can see from the list below. I've tried to provide a chunk of HTML where it might help the example.

Textarea fields

Text input fields

Buttons

Combobox or select dropdowns

Listviews

Slider control

Toggle switch

Radio buttons

Checkboxes

Amazon logo

If this article was interesting, or helpful, or even wrong, please consider leaving a comment, or buying something from my wishlist. It's appreciated!

comments powered by Disqus
coach outlet online jordan 13 grey toe beats by dre cyber monday michael kors black friday beats by dre cyber monday jordan 6 black infrared north face cyber monday michael kors cyber monday north face black friday coach outlet black infrared 23 13s north face cyber monday jordan 6 black infrared north face black friday coach cyber monday jordan 11 legend blue north face cyber monday black infrared 6s lebron 12 north face black friday jordan 11 legend blue louis vuitton outlet jordan 13 grey toe grey toe 13s beats by dre black friday coach black friday jordan 13 grey toe coach cyber monday uggs black friday jordan 13 black infrared 23 uggs cyber monday barons 13s uggs black friday beats by dre cyber monday black infrared 6s jordan 13 bred jordan 13 black infrared 23 north face black friday black infrared 6s jordan 11 legend blue michael kors black friday jordan 13 grey toe coach black friday michael kors black friday michael kors cyber monday beats by dre cyber Monday north face cyber monday coach black friday michael kors cyber monday beats by dre cyber Monday north face black friday beats by dre black friday lululemon black friday uggs black friday jordan 13 bred coach cyber monday beats by dre black friday uggs black friday coach black friday black infrared 6s