Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

re-apply css classes using jquery

Tags:

jquery

css

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

like image 310
jdross Avatar asked Jul 19 '26 08:07

jdross


1 Answers

if you are only having width and height modified try

$('.mydivclass').css({width: '', height: ''})
like image 109
Guard Avatar answered Jul 21 '26 21:07

Guard



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!