Hey guys I'm trying to create a function and call it inside another each loop. I got it to work, but the each loop is not working. So I tried to add an extra $(this) and it didn't work either...any help is appreciated.
.moveClass {
position:relative;
}
$(function() {
$('.a_projectLoad').each(function(evt){
$(this).hover(function(){
$(this).slideRight();
});
});
});
function slideRight () {
$('.img_rightArrow')
.addClass('moveClass')
.animate({"left": "+=50px"}, "fast");
}
<table>
<tr>
<td><a href="#" class="a_projectLoad">Title Goes Here</a></td>
<td ><img src="images/btn_loadProject.png" class="img_rightArrow"/></td>
</tr>
<tr>
<td><a href="#" class="a_projectLoad">Title Goes Here</a></td>
<td><img src="images/btn_loadProject.png" class="img_rightArrow"/></td>
</tr>
</table>