jquery-mobile-button

JQuery Mobile Custom Theme Buttons

£可爱£侵袭症+ 提交于 2019-12-02 01:02:52
I just started using a jquery mobile custom theme instead of one of the defaults. Lots of issues...but the current one is that dynamically created buttons don't work as expected. I have some dynamic html I'm injecting via $("#container").append(...) <div> <a class="view-it" data-role="button" href="">View</a> </div> Because it's dynamic, I need to do $("*[data-role='button']").button(); to get it to initialize. Although my button now looks like a button, the anchor instead still looks like a hyperlink and the click event only fires when clicking on the hyperlink inside the button, not on other

Extra container appearing around button in jQuery Mobile 1.4.2

浪子不回头ぞ 提交于 2019-12-01 12:11:15
I have a <button> in jQuery Mobile 1.4.2 that's being shown with an extra <div> container appearing around it. I did not have this problem with jQM 1.3.2. This is the code I'm using ( note that the problem doesn't appear in jsFiddle ): <div data-theme="a" data-role="page"> <div role="main" class="ui-content"> <button id="test1" data-inline="true" data-mini="true" title="test1">Test 1</button> </div> </div> And this is the fiddle that shows the extra div inserted by jQM: Demo With Extra Div How do I get rid of the extra div? Omar As of jQuery Mobile 1.4, use .button() only for input with type