Direct vs. Delegated – jQuery .on()

Case 1 (direct): $(“div#target span.green”).on(“click”, function() {…}); == Hey! I want every span.green inside div#target to listen up: when you get clicked on, do X. Case 2 (delegated): $(“div#target”).on(“click”, “span.green”, function() {…}); == Hey, div#target! When any of your child elements which are “span.green” get clicked, do X with them. In other words… In case … Read more

Prevent scrolling of parent element when inner element scroll position reaches top/bottom?

I am adding this answer for completeness because the accepted answer by @amustill does not correctly solve the problem in Internet Explorer. Please see the comments in my original post for details. In addition, this solution does not require any plugins – only jQuery. In essence, the code works by handling the mousewheel event. Each … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)