help me understand this interaction between hover and find
I have a simple block of code that uses hover to apply a slideUp and slideDown. For some reason using $(this).child('p') I can't access the nested paragraph tag. But switching to $(this).find('p') works? Why is this, i tried several different selectors that would have worked in other situations, but these would not work with hover. What is going on here?
- $('#wrap ul li p').hide();
- $('#wrap ul li').hover(function(){
- $(this).find('p').slideDown( 300 );
- },function(){
- $(this).find('p').slideUp( 300 );
- });