0 votes
in Jquery by
Find all parent elements (in my case its all parent "<li>" elements) with Jquery. Idea is to set active classes for my dropdown menu.

Can I do this with "parents" Jquery filter?

1 Answer

0 votes
Supply $(this) to the code below and you are good to go. Change the css code to your requirements as well.

$(this).css({"color": "red", "border": "2px solid red"});

Related questions

0 votes
1 answer 8.1k views
+1 vote
1 answer 2.2k views
+1 vote
1 answer 9.4k views
asked May 11, 2017 in Jquery by Jasna
0 votes
1 answer 7.6k views
+1 vote
1 answer 1.2k views