Почему click event здесь не работает? Какая у меня ошибка?Событие с кликом не работает, если имя класса совпадает с именем
$(document).ready(function() {
$('.dashboardList').click(function() {
alert("hello");
});
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div class="dashboardList unread">
<div class="dashboardList unread">
<div class="dashboardList unread">
<div class="dashboardList unread">
<div class="dashboardList unread">
Использование мероприятие Делегация –
Прочитайте [Прикрепить и отсоедините обработчики событий] (http://stackoverflow.com/documentation/jquery/1321/events/7665/attach-and-detach-event-handlers#t=201701121235252486981) в [SO Documentation] (http://stackoverflow.com/documentation/jquery/1321/events/7665/attach-and-detach-event-handlers#t=201701121235252486981) –