Results 1 to 5 of 5

Thread: My jquery is not working for an image mouse hover?

  1. #1
    Join Date
    May 2011
    Posts
    523

    My jquery is not working for an image mouse hover?

    Hey friend hello how’s everyone doing I got a problem in jquery while I was attempting a mouse hover effect to and image? I am using CSS with jquery for this effect I found that my CSS is well defined but the problem is going with the jquery can anyone of you help me out of this problem I would say just a jquery hint would do I don’t want whole of the script to be explained I just want to deal in with jquery part so any hint please share.

  2. #2
    Join Date
    Apr 2009
    Posts
    488

    Re: My jquery is not working for an image mouse hover?

    Ok this is nice that you are sure that your CSS part and other coding part is working fine in that case if you just want to deal with jquery part so I have a simple solution as per as my view jus go through it and look for any help you can get with it so it like this
    Code:
    <script type="text/JavaScript">
    $(document).ready(function(){
    //Set opacity on each span to 0%
    $(".rollover").css({'opacity':'0'});
     
    $('.img_list a').hover (
        function() {
            $(this).find('.rollover').stop().fadeTo(500, 1);
        },
        function() {
            $(this).find('.rollover').stop().fadeTo(500, 0);
        }
    )
    });
    </script>
    dose your jquery part look alike this .

  3. #3
    Join Date
    May 2009
    Posts
    539

    Re: My jquery is not working for an image mouse hover?

    Hmm, the suggestion looks fine but don’t know which syntax you are using I have a changed logic syntax let’s see if not the above one is this helping you out you need to try this one because I have been succeed with this one number of time.
    Code:
    jquery(document).ready(function(){  
              jquery(".hov").hover(function() {  
                  Jquery (this).attr("src",function() {return this.src.substring(0,this.src.length-4)+ '_h.jpg'});  
                    }, function() {  
                jquery(this).attr("src",function() {  return  this.src.substring(0,this.src.length-6)+ '.jpg'});  
             });  
         });
    Use your CSS into this and try the effect is it working now.

  4. #4
    Join Date
    Mar 2010
    Posts
    154

    Re: My jquery is not working for an image mouse hover?

    Hello dear not really well into the Jquery but I think you must recheck your code again and again quite a few time rather changing just because a part of your code is not working I think you need to go through your code or ask a help from the professors around you for that and your friends who may be good in it well am saying this because if your complete code would have been messed up or you are unable to get any clue then it would have been ok if you want number of solution but when you have done with your complete coding and part of it isn’t working so I think you should work hard on it and get it done I don’t have any coding solution for you as am none of the hard coders but can help you by supporting you by saying you are having just a little part problem I think you can do it on your own. Best of luck. Hope you do it soon.

  5. #5
    Join Date
    May 2009
    Posts
    529

    Re: My jquery is not working for an image mouse hover?

    Well dude I have been working out with a project these days and I too had some image hover effect to be done in ma program can’t exactly say that would this example which I am about to give would work for you or no but it did worked very much with mine I would just like to give you a clue by sharieng it so
    Code:
    jQuery( document ).ready( function($) {  
        $( ".thumbnail a" ).mouseover( function() {  
            $( this ).children( "img" ).stop( true, true ).animate({  
                opacity: 0.6  
            }, 200, "swing", function() {  
                $( this ).animate({  
                    opacity: 1  
                }, 400 );  
            });  
        });  
    });

Similar Threads

  1. Mouse cursor won't change in Google Chrome when hover over link
    By The#Gaelic in forum Technology & Internet
    Replies: 4
    Last Post: 03-03-2012, 10:55 AM
  2. Internet zoom: hover service on screen is not working properly
    By Dalapathi in forum Technology & Internet
    Replies: 3
    Last Post: 18-02-2011, 12:09 PM
  3. Set a mouseover image effect using jQuery
    By Ektaa in forum Software Development
    Replies: 3
    Last Post: 23-05-2009, 10:43 AM
  4. How to change the mouse hover time in Windows 7
    By Villiers in forum Operating Systems
    Replies: 3
    Last Post: 05-05-2009, 10:41 PM
  5. Mouse Hover Activate
    By Dick in forum Vista Help
    Replies: 22
    Last Post: 12-01-2009, 03:48 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,312,998.46888 seconds with 17 queries