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
Post a Comment