i want to add a class to a tag using jquery based on a if condition the code is
if ($(".asp:contains('Home')")) {
$("ul.nav-pills a:contains('Home')").
parent().addClass('active');
}
else if ($(".asp:contains('List')")) {
$("ul.nav-pills a:contains('List')").
parent().addClass('active');
}
am i doing it right?
Aucun commentaire:
Enregistrer un commentaire