javascript - Any possibilities for hasClass Name make true all the child elements -


if(element.toelement.classname == 'section') 

if class name matches section want when user clicks child elements of section div want make true condition.

when user click div need check class name if class name match need execute function.

but issue when user click child element of matched class going else condition.

any possibilities on there??

try this

$(this).parents().hasclass('section'); 

Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -