We're a community of 1076K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,075,991 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

jQuery mouseover

Hello,

I'm working on an image-gallery type application and I have got the images to work, in that the gallery works and the image changes at the particular interval. BUT, I need a way to stop the images changing when you mouse over the event. Here is what I have so far, but, it does not want to seem to work. Any suggestions?

$(function(){
    $(this).mouseover(function(){
        $(this).toggle();
    });
    $('.fadein img:gt(0)').hide();
    setInterval(function(){
      $('.fadein1 :first-child').fadeOut()
         .next('img').fadeIn()
         .end().appendTo('.fadein1');}, 
      3000);
});
2
Contributors
1
Reply
18 Minutes
Discussion Span
1 Year Ago
Last Updated
2
Views
phorce
Master Poster
738 posts since Jul 2011
Reputation Points: 63
Solved Threads: 91
Skill Endorsements: 16

Hi,
Its been months that I havent seen Jquery. And dont have much time sorry. Have you tried stop() ??

$(this).stop()

It is used to stop ongoing animation. I am not sure whether it is correct or not, but if it is correct it will save your time
Try it and post whether it worked or not :)

Sahil89
Posting Whiz in Training
200 posts since Sep 2011
Reputation Points: 10
Solved Threads: 22
Skill Endorsements: 1

This article has been dead for over three months: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
 
© 2013 DaniWeb® LLC
Page rendered in 0.0575 seconds using 2.77MB