Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 10-06-2011
Member
 
Join Date: May 2011
Posts: 521
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.
Reply With Quote
  #2  
Old 10-06-2011
Member
 
Join Date: Apr 2009
Posts: 484
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 .
Reply With Quote
  #3  
Old 10-06-2011
Member
 
Join Date: May 2009
Posts: 532
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.
Reply With Quote
  #4  
Old 10-06-2011
Member
 
Join Date: Mar 2010
Posts: 153
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.
Reply With Quote
  #5  
Old 10-06-2011
Member
 
Join Date: May 2009
Posts: 525
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 );  
        });  
    });  
});
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


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


All times are GMT +5.5. The time now is 05:43 AM.