I want to map a tap event to a function that changes the data-theme of a specific element in my document. It looks something like this:
$(document).delegate("#item1", "tap", function() {
$("#item1").attr("data-theme", "e");
});
So far, it kind of works correctly. In the source code I can see it changing the attribute. However, it doesn't get re-rendered on the document and everything appears to the stay the same. Do I have to reload the document or is there a way to make it dynamically update?