Assuming I have <ul class="myList verticalList"> how can I change the value of verticalList using jquery?
Try a combination of addClass and removeClass
$(selector).removeClass('verticleList').addClass('newClass');
Also, did you mean: vertical
I thnik what you want to do is remove that class and change to another? see addClass and removeClass
$('.verticalList').addClass('foo').removeClass('verticalList')
P.S. I've corrected spelling of 'vertical' in this version
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With