SitePoint Sponsor |
|
User Tag List
Results 1 to 8 of 8
Thread: mouseover?
Hybrid View
-
Jun 22, 2007, 23:58 #1
- Join Date
- May 2007
- Posts
- 22
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
mouseover?
How do I code a page to invert an image if the user moves the mouse over it?
-
Jun 23, 2007, 00:17 #2
- Join Date
- Jul 2006
- Location
- Victoria, Australia
- Posts
- 4,122
- Mentioned
- 29 Post(s)
- Tagged
- 2 Thread(s)
A real cheap and nasty way is to add a onMouseOver attribute to the image.
<img src="img1.jpg" onMouseOver="this.src='img2'" onMouseOut="this.src='img1'" alt="">
hmmm.. a really cheap and nasty way.
-
Jun 23, 2007, 00:27 #3
- Join Date
- May 2007
- Posts
- 22
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
invert
Can I add the invert filter with this code?
-
Jun 23, 2007, 00:30 #4
- Join Date
- Jul 2006
- Location
- Victoria, Australia
- Posts
- 4,122
- Mentioned
- 29 Post(s)
- Tagged
- 2 Thread(s)
Are you talking about Internet Explorer's proprietary style filter ?
That would make it even cheaper and nastier!
-
Jun 23, 2007, 00:38 #5
- Join Date
- May 2007
- Posts
- 22
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I need the invert filter to be applied when the mouse over occurs
<img src = "pic.jpg" style = "filter: invert" alt = "pic"/>
-
Jun 23, 2007, 00:51 #6
- Join Date
- Jul 2006
- Location
- Victoria, Australia
- Posts
- 4,122
- Mentioned
- 29 Post(s)
- Tagged
- 2 Thread(s)
Code:<img src="img1.jpg" onMouseOver="this.src='img2'; this.style.filter='invert'" onMouseOut="this.src='img1'; this.style.filter=''" alt="">
-
Jun 23, 2007, 01:30 #7
- Join Date
- May 2007
- Posts
- 22
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Thanks that got it working,
Thanks that got it working, would you know how to code a script to blurs an image then slowly unblurs it when it finishes loadingusing the onload event?
-
Jun 23, 2007, 02:50 #8
- Join Date
- Jul 2006
- Location
- Victoria, Australia
- Posts
- 4,122
- Mentioned
- 29 Post(s)
- Tagged
- 2 Thread(s)
You may want to Google javascript libraries like scriptaculous.
Bookmarks