+ 1

Can anyone detail the following code ?

$(".tab-content").find(".define[dataaction=_eventListener]").unbind().bind("click", function (e) {//function code here}

30th Dec 2020, 1:25 PM
𝖆𝖙.đ–šđ•·
𝖆𝖙.đ–šđ•· - avatar
1 Answer
+ 1
Find any elements matching ".tab-content .define[dataaction=_eventListener]" and reattach a click listener to them, removing all listeners first. MATCHING HTML EXAMPLE <div class="tab-content"> ... <button class="define" dataaction="_eventListener">Click me!</button> ... </div>
31st Dec 2020, 12:17 AM
David OrdĂĄs
David OrdĂĄs - avatar