homepage Welcome to WebmasterWorld Guest from 54.197.110.151
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

    
Jquery bounce help
Jquery image bounce effect
roclimb

5+ Year Member



 
Msg#: 4399575 posted 2:08 am on Dec 20, 2011 (gmt 0)

wondering if anyone out there can help with this? Im an absolute beginner at Jquery and have a added an animation to make an image slide. I want to make the .cover class also bounce and cant seem to figure out how to add the effect in the code and make it work.

Any help would be greatly appreciated.


Here is my code:
$(document).ready(function(){
//Full Box Sliding (Hidden to Visible)
$('.nub').hover(function(){
$(".cover", this).stop().animate({left:'200px'},{queue:false,duration:160});
}, function() {
$(".cover", this).stop().animate({left:'250px'},{queue:false,duration:160});
});
});

 

DrDoc

WebmasterWorld Senior Member drdoc us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 4399575 posted 5:53 pm on Dec 29, 2011 (gmt 0)

If I understood your question correctly, you want both the
.nub and .cover to bounce at the same time, triggered by hovering .nub?

If so, simply change your code to:

$(document).ready(function() { 
//Full Box Sliding (Hidden to Visible)
$('.nub').hover(function(){
$(this).stop().animate({left:'200px'},{queue:false,duration:160});
$('.cover').stop().animate({left:'200px'},{queue:false,duration:160});
}, function() {
$(this).stop().animate({left:'250px'},{queue:false,duration:160});
$('.cover').stop().animate({left:'250px'},{queue:false,duration:160});
});
});

roclimb

5+ Year Member



 
Msg#: 4399575 posted 6:53 pm on Jan 18, 2012 (gmt 0)

Thanks for the reply. Do I need to install the easeing folder to my server to make this work. All Im getting is a choppy animation when I do this.
Thanks

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved