| | |||||
| ||||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | THREAD STARTER #1 (permalink) |
| New Member Join Date: Mar 2005
Posts: 2
![]() | Need help in Javascript please, Image rollover for gallery Hey, I need the Javascript code for the image rollovers that have a thumbnail, you rollover the thumbnail, and the fullsize appears below.... If that makes sense ![]() Thanks! |
| |
| | #2 (permalink) |
| New Member Join Date: Apr 2005
Posts: 8
![]() | What you need to do is something like this: You have all your img tags in whatever way you want them to be, but with this attribute: onMouseover="swap(this.src)". Then you have your main image, something like so: <img src="??" id="mainImg" /> Now in your head tag, you need a function, called swap (as referred to earlier): <script language="JavaScript"> function swap(input) { var img = document.getElementById('mainImg'); img src = input; } </script> That should do it, if it doesn't let me know...
__________________ Adam Quaile Dancing Badger Web Design (http://www.dancingbadger.co.uk) For articles, tutorials, tips, tricks etc... on web design, programming, the web, and other similar funky stuff |
| |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Rollover Image. | pooh bear | Web Design Discussion | 5 | 03-07-2005 10:53 PM |
| Rollover image link to bookmark | binu | Web Design Discussion | 1 | 01-03-2005 10:08 PM |
| xhtml/javascript image rollover , help me | killmesuicide | Programming | 2 | 04-13-2004 04:36 PM |
| CSS and Two Image Rollover Effects | wasabisam | Programming | 2 | 03-03-2004 06:12 AM |
| Javascript roleover image help! | DeltaWeb | Programming | 3 | 11-06-2003 08:39 AM |