Page 1 of 1

Using Jquery Animation

Posted: 06 May 2011, 10:42
by mdt414
hi
i wanna use jQuery animation to animate the image box in the category view but nothing happend...
i think its very simple .. here is my code in head section of my page:

Code: Select all

<script type="text/javascript"> 
var j= jQuery.noConflict();
j(document).ready(function(){ 
  j(".phocagallery-box-file").mouseover(function(){ 
    j(".phocagallery-box-file").animate({'top': '-20px'},"fast"); 
  }); 
  j(".phocagallery-box-file").mouseleave(function(){ 
    j(".phocagallery-box-file").animate({'top': '0px'},"fast"); 
  }); 
}); 
whats the problem?
thanks..

Re: Using Jquery Animation

Posted: 06 May 2011, 21:28
by mdt414
i got it!
i add this code to head section of my template index.php

Code: Select all

<script type="text/javascript"> 
var j= jQuery.noConflict();
j(document).ready(function(){ 
  j("div.phocagallery-box-file").mouseover(function(){ 
    j("div.phocagallery-box-file").animate({'top': '-20px'},"fast"); 
  }); 
  j("div.phocagallery-box-file").mouseleave(function(){ 
    j("div.phocagallery-box-file").animate({'top': '0px'},"fast"); 
  }); 
}); 
</script> 
and now!
when you get your mouse over the picture it animate like you pick it up! NICE! :|

Re: Using Jquery Animation

Posted: 09 May 2011, 23:20
by Jan
Great to hear it, Jan