/    Sign up×
Community /Pin to ProfileBookmark

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”);
}
);
});[/CODE]

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!

to post a comment
JavaScript

4 Comments(s)

Copy linkTweet thisAlerts:
@xeteaJun 29.2010 — Can't you just set the opacity for the link to 0 in the css?
Copy linkTweet thisAlerts:
@therealroauthorJun 29.2010 — Can't you just set the opacity for the link to 0 in the css?[/QUOTE]


Well its a div where a png image gets visible on hover, so thats not an option i guess ?
Copy linkTweet thisAlerts:
@xeteaJun 29.2010 — 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;
}[/CODE]
Copy linkTweet thisAlerts:
@therealroauthorJun 29.2010 — 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;
}[/CODE]
[/QUOTE]


Ok great! i will check this tonight.

What about the [CODE]zoom:1;[/CODE] when you use the filter option for IE?


Thanks alot for now ?
×

Success!

Help @therealro spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...