Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

jquery remove and add class

$( "#foo" ).toggleClass( 'className', addOrRemoveOptional );

//OR
if ($( "#foo" ).hasClass('className')) {
	$( "#foo" ).removeClass( 'className');
} else {
  $( "#foo" ).addClass( 'className');
}
Comment

jquery remove class

$("#div1").on("click", function () {
    if ($(this).hasClass("active")) {
      setTimeout(function () {
        $("#div1").removeClass("active");
      }, 10);
    }
  });
Comment

add and remove class in jquery


$('#menu li a').on('click', function(){
    $('#menu li a.current').removeClass('current');
    $(this).addClass('current');
});

Comment

add and remove class in jquery

$('#toggle li').on('click', function () {
    $(this).toggleClass('open')
});
Comment

jquery remove class

$('#element').removeClass('className');
Comment

PREVIOUS NEXT
Code Example
Javascript :: proper regex website url validation 
Javascript :: bootstrap italics 
Javascript :: fetch json post 
Javascript :: Error: It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function. 
Javascript :: style.visibility javascript 
Javascript :: add id jquery 
Javascript :: createroot react 
Javascript :: javascript open page in same tab 
Javascript :: how to select the next element in js 
Javascript :: hide search in datatable 
Javascript :: prevent default window on right click menu 
Javascript :: vanilla js on click 
Javascript :: get current formatted time in javascript 
Javascript :: authfunctions react 
Javascript :: angular pipe for 2 decimal places 
Javascript :: how to Store Objects in HTML5 localStorage 
Javascript :: installing vuex 
Javascript :: remove square brackets from string javascript 
Javascript :: remove all inline css jquery 
Javascript :: add div after div jquery 
Javascript :: javascript get current month start and end date 
Javascript :: how to get value of button that click on it jquery 
Javascript :: js change html lang 
Javascript :: javascript void 
Javascript :: in array jquery 
Javascript :: get window width jquery 
Javascript :: colab notebook keeps getting disconnected 
Javascript :: arrow not showing react slick 
Javascript :: javascript get random floating number 
Javascript :: babel cdn react 
ADD CONTENT
Topic
Content
Source link
Name
3+9 =