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

service - Android MediaPlayer calls onCompletion before it already finished -

javascript - Training Neural Network to play flappy bird with genetic algorithm - Why can't it learn? -

javascript - Create a stacked percentage column -