how to Change jquery to Vanilla javascript

cmuralisree

Chittoji Murali Sree Krishna

Posted on March 18, 2021

how to Change jquery to Vanilla javascript
$(this).parent().parent().find(".imgHide").toggleClass("imgShow"); 
Enter fullscreen mode Exit fullscreen mode

to javaScript
for parent() we can use parentElement
for toggleClass() we can use .classList.toggle("class")
but for .find() i am not able to get any alternative in vanilla js.

💖 💪 🙅 🚩
cmuralisree
Chittoji Murali Sree Krishna

Posted on March 18, 2021

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related

Begging for help
javascript Begging for help

October 2, 2024

ES6 - A beginners guide - Array Helpers
javascript ES6 - A beginners guide - Array Helpers

January 23, 2022

Programming without a computer?
help Programming without a computer?

December 12, 2019