I have many divs on a page that the height and width are altered based on the user. Is there an easy way to restore the styles back to the default value in the css page itself without actually refreshing the page.
I know I could manually apply the height and width back to the default, but didn’t know if there was a way to have jquery apply the class values back to the element that’s been modified?
Thanks for any help
Check out ‘addClass’ and ‘removeClass’:
That will reset the style to the defaultStyle class. You could also just set
attr('class', 'defaultStyle'), but this will also remove any other classes you have on the same div.