Using Jquery Animation

Phoca Gallery - image gallery extension
mdt414
Phoca Newbie
Phoca Newbie
Posts: 6
Joined: 09 Apr 2011, 18:16

Using Jquery Animation

Post 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..
mdt414
Phoca Newbie
Phoca Newbie
Posts: 6
Joined: 09 Apr 2011, 18:16

Re: Using Jquery Animation

Post 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! :|
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49198
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Using Jquery Animation

Post by Jan »

Great to hear it, Jan
If you find Phoca extensions useful, please support the project
Post Reply