jquery toggle not working eventhough Console.log shows the changes

125 views Asked by At

When applying toggleClass/removeClass function to the "div" - the changes are not being reflected on the HTML - but if I print the element i can see that the class was applied ?

$(mylement).toggleClass('myclass');

This is from Console by printing the element after the above statement.

classList: DOMTokenList[4]0: "aaa"1: "bbb"2: "ccc"3: "myClass"

But this does not reflect on the HTML page.

"myClass" just hides/shows the page.

I am using SimpleModal and this is happening once i launch the modal second time on the page.

0

There are 0 answers