JQuery Mobile sucks

You have to add “.button(‘refresh’);” to change  view of the button.

<script>
$(document).ready(function() {
$(“#data_delete_btn”).attr(‘disabled’,’disabled’);

$(“#delete_button_checkbox”).click(function() {
if ($(this).is(‘:checked’)) {

$(“#data_delete_btn”).removeAttr(“disabled”).button(‘refresh’);
}
else {
$(“#data_delete_btn”).attr(‘disabled’,’disabled’).button(‘refresh’);
}
});
});
</script>

I dislike JQuery Mobile

Do not invest too much time to develop with JQuery Mobile library.

The design is pretty. But at the end of the project when you have to create element dinamically You will fill hours with searching on Google to find the solution to force Element to work.

I mean:

$(“#currelement”).trigger(“create”);

or using datepicker in a dinamically created element.

 

Bootstrap & JQuery  is the right tool.

 

 

 

dynamically created element in JQuery Mobile (does not apply styles after dynamically adding content)

I added <li> elements in <ul> with JQuery.

$(‘ul’).append(“<li>…</li>”);

First the <li> elements didn’t appear in<ul>

I found the solution here: http://stackoverflow.com/questions/7999436/jquery-mobile-does-not-apply-styles-after-dynamically-adding-content

I had to add this row:

$(‘ul’).listview(‘refresh’);