jquery add active class

Solutions on MaxInterview for jquery add active class by the best coders in the world

showing results for - "jquery add active class"
Trenton
28 Jan 2018
1/*
2  CSS:
3  .active{
4    color: red;
5    font-weight: bold;
6  }
7*/
8/* Before Execution*/
9<a href="google.com" class="my-link">Google</a>
10$(".my-link").click(function() {
11  $(this).addClass("active");
12})
13______________________________________________
14/* After Execution*/
15<a href="google.com" class="my-link active">Google</a>
16
queries leading to this page
add active class current path jqueryhow to add active class to current element jqueryactive class by jqueryadd active class to current element jqueryadd class active jqueryhow to add active element add active class jqueryadd active class in menu li using jqueryhow to add class on active in jqueryjquery give active to elementhow to add class active in jqueryhow to add active class dynamically in jqueryadd class to active element from list jqueryadd active class to menu using jqueryhow to add active class on click in jqueryactive class add by jqueryadd class active on anchor tag insie li in jqueryhow to add active class in jqueryhow to make active class in jqueryhow to add active class on li using jquery jquery add active classjquery add active class on clickhow to current element add active class jqueryactive class in jqueryadd class active in jqueryjquery add class active on clickhow to add active class using jqueryadd active class to current page jquerychange class active jqueryhow to add active class when click a button jqueryjquery add active class to current pagejquery add active to class on loadadd active class to li a jqueryactive class jqueryadd active class in tags link jqueryadd active jqueryhow to add css using jquery where class is activehow to active class in jqueryjquery add active class to current menu itemhow to add css using jquery where class activejquery on click add active classjquery add active class to btnjquery change active class lijquery active classadd active class on button click jqueryjquery add active class to child elementjquery set active classadd active class to a onclick jquerylist of classes 2c add active class on clicked jqueryaddclass 28 27active 27 29 in jqueryjquery 2bchange html css with active classjquery on click add active class inside loopactive class with jqueryjquery classse activeadd active class based on url jqueryjquery add class when activeul li add active class jqueryclass is active jqueryadd class active on click jquery active class in jqueryclass active jquerypass active class to clicked li in jqueryjquery add active class to li on clickjquery add active to classadding active class jqueryjquery set active class on clickadd active class to li onclick jqueryadd tag when active class in jqueryadd class on jquery on active menu itemjquery add class activeadd and remove active class in jquerydynamic active class jquerymake class active in jqueryon click add class active class jqueryadd class to active link jqueryjquery add active class to navbarjquery add active class