mardi 22 mars 2016

jQuery - all children of a div with class of row

This may have been asked before but I am having troubles. I am trying to do some jquery against all div.row within a div.panel-body.

<div class="panel panel-body">
  <div class=row>
    ...
  </div>
</div>

I have been trying something like this

$(".panel-body").children(".row").mouseover(function(){ $(this).addClass("mover");}).mouseout(function(){ $(this).removeClass("mover");})

If I use just $(".row") it works fine but it affects as you guess all elements with class=row.

What am I missing here?



jQuery - all children of a div with class of row

Aucun commentaire:

Enregistrer un commentaire