You need to bind the event to on () , using this will bind any element added to the DOM with the corresponding selector. The advantage of using on() over live() is that you can narrow the context to a specific container, not the entire document . In my example, I just use document as a context.
jQuery 1.7 use on ()
$(document).on('mouseover', '.contact', function(){ ... });
Less than 1.7 , use delegate ()
$(document).delegate('.contact', 'mouseover', function(){ ... });
Less than 1.4.2 , use live ()
$('.contact').live('mouseover', function(){ ... });
source share