Web Hosting Talk







View Full Version : Jquery autohide


sash_007
03-01-2010, 07:56 AM
Hello friends,

just tried to add this effect (https://buildinternet.s3.amazonaws.com/live-tutorials/sliding-boxes/index.htm) to my portfolio page (http://www.webdesigncut.com/portfolio/index3.php) but it isnt working on mypage
so far i have done upto this only thing is i want the slider to be up on mouse over
here is my jquery code
<script type="text/javascript">
$(document).ready(function(){
//To switch directions up/down and left/right just place a "-" in front of the top/left attribute
//Vertical Sliding
$('.boxgrid.slidedown').hover(function(){
$(".cover", this).stop().animate({top:'-150px'},{queue:false,duration:300});
}, function() {
$(".cover", this).stop().animate({top:'0px'},{queue:false,duration:300});
});
//Horizontal Sliding
$('.boxgrid.slideright').hover(function(){
$(".cover", this).stop().animate({left:'284px'},{queue:false,duration:300});
}, function() {
$(".cover", this).stop().animate({left:'0px'},{queue:false,duration:300});
});
//Diagnal Sliding
$('.boxgrid.thecombo').hover(function(){
$(".cover", this).stop().animate({top:'150px', left:'284px'},{queue:false,duration:300});
}, function() {
$(".cover", this).stop().animate({top:'0px', left:'0px'},{queue:false,duration:300});
});
//Partial Sliding (Only show some of background)
$('.boxgrid.peek').hover(function(){
$(".cover", this).stop().animate({top:'40px'},{queue:false,duration:160});
}, function() {
$(".cover", this).stop().animate({top:'0px'},{queue:false,duration:160});
});
//Full Caption Sliding (Hidden to Visible)
$('.boxgrid.captionfull').hover(function(){
$(".cover", this).stop().animate({top:'120px'},{queue:false,duration:160});
}, function() {
$(".cover", this).stop().animate({top:'150px'},{queue:false,duration:160});
});
//Caption Sliding (Partially Hidden to Visible)
$('.boxgrid.caption').hover(function(){
$(".cover", this).stop().animate({top:'120px'},{queue:false,duration:160});
}, function() {
$(".cover", this).stop().animate({top:'180px'},{queue:false,duration:160});
});
});
</script> so what changes need to be done