you do not need the document.ready function inside document.ready ..
try it
$(function() { //<--this is shorthand for document.ready $('.parent_div').hover(function() { alert("hello"); $(this).find('.hotqcontent').toggle(); //or $(this).children().toggle(); }); });
, and yes, your code will switch all hotqcontent with the class hotqcontent .. (which, I think, you do not need it), if you want to switch this particular div, use the this link to switch this particular div
updated
you can use for delegated events for dynamically generated elements
$(function() { //<--this is shorthand for document.ready $('.content').on('mouseenter','.parent_div',function() { alert("hello"); $(this).find('.hotqcontent').toggle(); //or $(this).children().toggle(); }); });
bipen
source share