Answer the question
In order to leave comments, you need to log in
Uncaught TypeError: $target.find is not a function Why don't methods work?
Friends, I have been working with jQuery for about two weeks and this question arose. There is a list of elements. If I access any element directly, then I can apply all methods to it, but if I hang a handler on the entire list (so-called event delegation) or use the each() method, then I get this error
Uncaught TypeError: $ target.find is not a function Here is the
html
code itself
<ul id='myList'>
<li></li>
<li></li>
<li></li>
<li></li>
</ul>
$('#myList').bind('click', function(event) {
var $target = event.target;
if($target.tagName !== 'LI') return;
var $currentPersonMenu = $target.find('.personMenu'); // тут ошибка! Не работает метод
console.log($currentPersonMenu);
})
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question