Reputation: 843
I want to set the default text of column-toggle in jquery mobile.
This should happen through code and not in the html.
I tried this:
$(document)
.ready( function() {
$("#myTableID").prop("data-column-btn-text","asd");
}
)
Upvotes: 0
Views: 36
Reputation: 24738
Instead of $(document).ready(... use the jQM pagecreate event. Thenyou can just set the text of the button directly using its class (.ui-table-columntoggle-btn):
$(document).on("pagecreate", "#page1", function () {
$(".ui-table-columntoggle-btn").text("asd");
});
Upvotes: 1