|
#1
|
|||
|
|||
|
1) Script Title: Lightbox V 2.0.4
2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...box2/index.htm 3) Describe problem: Simply put, is there anyway to have the image viewer window open onmouseover rather than onclick? If I use rel="lightbox" , then I have to click on the image for the viewer to open. I would rather need the image to open onmouseover Thanks in advance |
|
#2
|
||||
|
||||
|
Go to lightbox.js. Find this part (found in lightbox.prototype):
Code:
Lightbox.prototype = {
// initialize()
// Constructor runs on completion of the DOM loading. Loops through anchor tags looking for
// 'lightbox' references and applies onclick events to appropriate links. The 2nd section of
// the function inserts html at the bottom of the page which is used to display the shadow
// overlay and the image container.
//
initialize: function() {
if (!document.getElementsByTagName){ return; }
var anchors = document.getElementsByTagName('a');
var areas = document.getElementsByTagName('area');
// loop through all anchor tags
for (var i=0; i<anchors.length; i++){
var anchor = anchors[i];
var relAttribute = String(anchor.getAttribute('rel'));
// use the string.match() method to catch 'lightbox' references in the rel attribute
if (anchor.getAttribute('href') && (relAttribute.toLowerCase().match('lightbox'))){
anchor.
__________________
Useful Links: [ FireFox3||HTML Validation||CSS Validation||Hate Tables?||Doctypes||HTML 4.01 Spec||CSS 2.1 Spec||CSS3 Info ] Useless Links: [ FashionStyleBlog||LaFontana||Bamboo Clothing||My Twitter ] |
| The Following User Says Thank You to rangana For This Useful Post: | ||
frank95a (08-12-2008) | ||
|
#3
|
|||
|
|||
|
Thanks so much... It worked like a charm
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
|
|