Loading...
Copy code
Close
Permalink
Close
Please tell us why you want to mark the subject as inappropriate.
(Maximum 200 characters)
Report Inappropriate
Cancel
Private Message
From :
guest
To :
Subject :
Content :
Type the characters you see in the picture below.
Send
Cancel
From :
guest
To :
Subject :
Content :
Type the characters you see in the picture below.
Send
Update
Cancel
Feedback
Email ID
Subject :
Comments :
Send
Cancel
Private Message
Type the characters you see in the picture below.
Type the characters you see in the picture below.
Attach files
Desktop
Google Docs
Each Attachment size should not exceed 1.0 MB.
Max no of attachments : 3
Loading User Profile...
guest
Response title
This is preview!
Attachments
Publish
Back to edit
Cancel
(
)
Sign In
New to this Portal? Click here to
Sign up
You can also use the below options to login
Login with Facebook
Login with Google
Login with Yahoo
jQuery
Plugins
UI
Meetups
Forum
Blog
About
Donate
All Forums
Recent Posts
Log In
Search
jQuery
Search
jQuery Forum
Move this topic
Forum :
Getting Started
Using jQuery
Using jQuery Plugins
Using jQuery UI
Developing jQuery Core
Developing jQuery Plugins
Developing jQuery UI
QUnit and Testing
About the jQuery Forum
jQuery Conferences
jQuery Mobile
Developing jQuery Mobile
Sub forum :
Move this topic
Cancel
Using jQuery
danw504
crossfade images
in
Using jQuery
•
9 years ago
hey all,
ive got a function which fades one image to another on hover:
$(document).ready(function(){
$(function() {
$('.appearing-image img').css('opacity', 0).
hover(function() {
$(this).stop(true, true).fadeTo(250,1);
}, function() {
$(this).stop(true, true).fadeTo(250,0);
});
});
however I had to modify it with .live() because I have a whole bunch of other functions and it wasn't working with them. So now I have this:
$('.appearing-image img').live({
mouseenter:
function()
{
$(this).stop(true, true).fadeTo(250,1);
},
mouseleave:
function()
{
$(this).stop(true, true).fadeTo(250,0);
}
}
);
My problem is that I can't seem to find a way to add the
$('.appearing-image img').css('opacity', 0)
to the function.
Any ideas..
Thanks
Dan
1
Reply
Replies(2)
kbwood.au
Re: crossfade images
9 years ago
You could apply this in CSS:
.appearing-image img {
opacity: 0;
filter: alpha(opacity = 0);
}
Leave a comment on kbwood.au's reply
danw504
Re: crossfade images
9 years ago
Thanks for the quick reply.
The css solution works in that it sets the opacity to 0, but now the crossfade doesn't work. The opacity just stays at 0.
The other solution doesn't work either. Is it possible something is interfering with it?
Thanks
Dan
Leave a comment on danw504's reply
Change topic type
Topic Type :
Discussions
Questions
Ideas
Problems
No of days :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
Change topic type
Cancel
Link this topic
Provide the permalink of a topic that is related to this topic
Permalink
Save
Close
Reply to danw504's question
Top
Reply
{"z2953500":[14737000002798379],"z5593033":[14737000002799538,14737000002800190]}
Statistics
2
Replies
2295
Views
0
Followers
Tags
Cancel
css
crossfade
opacity
live
Actions
Permalink