porque_no_les_deux
porque_no_les_deux

Reputation: 479

jQuery Mobile Styling not applied to elements added after DOM initialization?

I'm using .insertAfter to stick some divs into my page after the DOM loads. Inside those divs are some <a href="" data-role="button">Example</a> elements, but they're not displaying as buttons. Just normal links. The jQuery Mobile CSS isn't being applied. Granted, this is all inside a giant data-role="none" div, but I have a data-role="listview" ul inside that same div and the JQM CSS is being applied to it perfectly well. Possibly because I used listview refresh on it? Is there some sort of equivalent method for other elements?

Upvotes: 0

Views: 1877

Answers (1)

stay_hungry
stay_hungry

Reputation: 1448

$('[type='submit']').button('refresh');

or

use

$('#urs_div').trigger('create');

Upvotes: 4

Related Questions