Home > Back-end >  never remove active class in jquery
never remove active class in jquery

Time:10-22

i added a class on my specific button,the button is on the slider,when i clicking the arrow of slider,the slider automaticly adding active class to antoher button, i want to write some method wich will never remove a class of my specific button how can i do it?

this is the code wich adding active class

($(item).parent('.owl-stage').parent('.owl-stage-outer').parent('.img-block').children('.owl-dots').children('button').not('.displayed-slider-btn')[2]).addClass('active');

CodePudding user response:

Just use another class. Class "active" is used by Owl plugin, you can not disable it without crashing the source code. For ex. add specific class "enabled" and copy for it all css style from class "active"

  • Related