Skip to content Skip to sidebar Skip to footer

Text Over Image Using Jquery And Css

Im using the tutorial http://www.webdesignlondon-tristar.co.uk/website-design-london/insane-jquery-image-rollover. I am wanting a fading/darken of the image on rollover and for the

Solution 1:

Your using an old version of jQuery (1.3.1) it will work (as it standS) as expected with a version > 1.4;

http://jsfiddle.net/dwrUj/

In you example your wrapping your ready code in the <script src=.. element, you need to separate the two, i.e from:

<scriptsrc="jquery-1.7.2.min.js"type="text/javascript">
    $(document).ready(function(){
    ...
</script>

to:

<scriptsrc="jquery-1.7.2.min.js"type="text/javascript"></script><scripttype='text/javascript'>
    $(document).ready(function(){
    ...
</script>

Solution 2:

Replace ur code as

<scriptsrc="jquery-1.3.1.min.js"type="text/javascript"></script><scripttype="text/javascript">

$(document).ready(function(){  

 $('.wrapper').hover(function(){


 $(this).children('.description').stop().show().fadeTo(200, 0.8);
},function(){
    $(this).children('.description').stop().hide().fadeTo(200, 0);
});


  });
</script>

It is working fine..Version is not a problem

Post a Comment for "Text Over Image Using Jquery And Css"