jquery - Cannot hover on dynamically generated div element -


i dynamically generating row , col-xs-6 col-sm-4 inside #locations-content div element.

<div id="locations-content">     <div class="row">         <div class="col-xs-6 col-sm-4"><img class="img-thumbnail" src="assets/img/boston.jpg" id="boston-img-popup"></div>     </div> </div> 

i trying image fade on hover, doesn't appear working. there wrong code:

$('#locations-content').on('hover', '.row > .col-xs-6.col-sm-4', function(event){     $(this).find('img').fadeto('slow', 0.4);       $(this).find('img').fadeto('slow', 1);   }); 

i believe need use mouseenter instead of hover

$('#locations-content').on('mouseenter', '.row > .col-xs-6.col-sm-4', function(event){   $(this).find('img').fadeto('slow', 0.4);     $(this).find('img').fadeto('slow', 1); }); 

Comments

Popular posts from this blog

java - Custom OutputStreamAppender not run: LOGBACK: No context given for <MYAPPENDER> -

java - UML - How would you draw a try catch in a sequence diagram? -

c++ - No viable overloaded operator for references a map -