How can i change the src attribute like in www.mysupermarket.com  ?
On changing category, the src attribute is resetting to a default value.
Like on hovering to a subcategory the img src is changing to  src value.
            Asked
            
        
        
            Active
            
        
            Viewed 180 times
        
    -2
            
            
         
    
    
        ciprian2301
        
- 264
- 3
- 10
- 
                    You have many places to find this answer as this seems to be the basic of all the ones. Please search and then post it as a question when you don't find any answers. – Arunkumar Srisailapathi Jan 30 '14 at 14:00
- 
                    html-css solution: see http://stackoverflow.com/questions/18032220/css-change-image-src-on-imghover – Roebie Jan 30 '14 at 14:02
- 
                    It is not clear what you are asking as you have not provided enough information, let alone any of your `CODE!` – Wez Jan 30 '14 at 14:02
- 
                    1Welcome to StackOverflow! (1) Please search for similar questions and answers before posting your own. (2) Please *always* provide sample code of what you've tried. – Blazemonger Jan 30 '14 at 14:03
1 Answers
1
            
            
        User .hover method.
$('#myImg').hover(function(){
  $(this).attr("src", "images/myImage.jpg");
});
 
    
    
        Sachin
        
- 40,216
- 7
- 90
- 102
- 
                    When i access a new category menu, the category image is the same as previous. Is not resetting the image. – ciprian2301 Jan 30 '14 at 14:01
- 
                    Please add your code in your post itself along with html and if possible then probably add it here as well http://jsfiddle.net – Sachin Jan 30 '14 at 14:02