Results 1 to 2 of 2

Thread: Help with (what I thought was) a basic fade/hover using jQuery :(

  1. #1
    Join Date
    Jan 2004

    Help with (what I thought was) a basic fade/hover using jQuery :(

    Here's the code I have (I'm using it along with a textarea resizer):

    <!-- JQuery -->
    	<script type="text/javascript" src="js/JQUERYlatest.js"></script>
    	<script type="text/javascript" src="js/jqueryResizeTextarea.js"></script>
        	<script type="text/javascript">
    		$(document).ready(function() {
    		$(".opaque img").fadeTo("slow", 0.6); // This sets the opacity of the thumbs to fade down to 60% when the page loads
    		$(".opaque img").hover(function(){
    			$(this).fadeTo("slow", 1.0); // This should set the opacity to 100% on hover
    			$(this).fadeTo("slow", 0.6); // This should set the opacity back to 60% on mouseout
    Here's the image:

    <a href="http://www.mydomain.com" class="PoweredBy_"><img class="opaque" src="img/myimage.gif" alt="img" width="168" height="24" border="0"></a>

    Why isn't this working? I'm not getting any errors in FF but nothing is fading.

  2. #2
    Join Date
    Jul 2003
    The City of Roses
    Most likely you need to move all the opaque img statements into the document ready block.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center