mardi 3 avril 2018

Dynamically changing html element's class in jquery mobile

I have a page i created using jquery mobile, the challenge i am having is how to add the ui-btn-active class to an anchor element on the page's navbar without directly doing that on the html. I tried adding that in a javascript function that should be executed after the page is loaded but the function gets called without the desired changed being effected. It however seems that the element gets the class added when i reload the page. Is there a way of doing that without reloading the page manually? Or do i need to add a function that automatically reloads the page each time a new page is fetched?




Aucun commentaire:

Enregistrer un commentaire