meetmandeep
12-29-2006, 02:10 AM
I'm naive in javascript...need some help. I'm using the Lightbox v2.0 script
Script Link: http://www.dynamicdrive.com/dynamicindex4/lightbox2/index.htm
I'm trying to write another javascript which simply adds rel="lightbox" to all images <a> tag on the page. So, all I would have to do is call two scripts (or combine them) and my images will automatically have lightbox effect.
Since I've not done any coding with javascript, i'm not sure how to achieve this. I was thinking along the lines of using document.images to get all the images and then possibly looking at the <a> tag right before it and appending rel="lightbox".
However, I have no idea how to achieve that with code and therefore I seek assistance fro Javascript Pros....
any help is much appreciated...thanks
Script Link: http://www.dynamicdrive.com/dynamicindex4/lightbox2/index.htm
I'm trying to write another javascript which simply adds rel="lightbox" to all images <a> tag on the page. So, all I would have to do is call two scripts (or combine them) and my images will automatically have lightbox effect.
Since I've not done any coding with javascript, i'm not sure how to achieve this. I was thinking along the lines of using document.images to get all the images and then possibly looking at the <a> tag right before it and appending rel="lightbox".
However, I have no idea how to achieve that with code and therefore I seek assistance fro Javascript Pros....
any help is much appreciated...thanks