www.webdeveloper.com
Results 1 to 5 of 5

Thread: on enter website opacity to none

  1. #1
    Join Date
    Jun 2010
    Posts
    3

    on enter website opacity to none

    Hi All,

    I have this script to show some hover effect, when you hover over the link a image is fading IN and and fading OUT when you hover out :

    Code:
    		$(document).ready(function(){
    				$(".a").hover(
    				function() {
    					$(this).stop().animate({"opacity": "1"}, "slow");
    				},
    				function() {
    					$(this).stop().animate({"opacity": "0"}, "slow");
    				}
    			);
    		});
    My question is, how can i set the opacity on 0 when the site loads? Now i see the hover effect when i enter the website and it should only be visible when i hover over the link.

    Thanks in advance!

    Greets!

  2. #2
    Join Date
    Jun 2010
    Posts
    54
    Can't you just set the opacity for the link to 0 in the css?

  3. #3
    Join Date
    Jun 2010
    Posts
    3
    Quote Originally Posted by xetea View Post
    Can't you just set the opacity for the link to 0 in the css?

    Well its a div where a png image gets visible on hover, so thats not an option i guess

  4. #4
    Join Date
    Jun 2010
    Posts
    54
    Yes it is, if the div has class="a" (as it seems judging from your code) just add this to your css:

    Code:
    .a {
    filter:alpha(opacity=0);
    opacity:0;
    }

  5. #5
    Join Date
    Jun 2010
    Posts
    3
    Quote Originally Posted by xetea View Post
    Yes it is, if the div has class="a" (as it seems judging from your code) just add this to your css:

    Code:
    .a {
    filter:alpha(opacity=0);
    opacity:0;
    }
    Ok great! i will check this tonight.
    What about the
    Code:
    zoom:1;
    when you use the filter option for IE?


    Thanks alot for now

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



Recent Articles