By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,985 Members | 1,776 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,985 IT Pros & Developers. It's quick & easy.

LightBox regex, add link around images.

P: n/a

Hi,

I want to add a link around images to add the lighbox JS.
(http://www.huddletogether.com/projects/lightbox/)

I need to look for <img ... /and wrap a <a href=... around it.

But the regex is a bit out of my depth here.
1- How do I know the link of the image, (because I need it for the
anchor)
2- How can I tell if there is already an image around the link, (so I
don't add another)?

Thanks

FFMG
--

'webmaster forum' (http://www.httppoint.com) | 'Free Blogs'
(http://www.journalhome.com/) | 'webmaster Directory'
(http://www.webhostshunter.com/)
'Recreation Vehicle insurance'
(http://www.insurance-owl.com/other/car_rec.php) | 'Free URL
redirection service' (http://urlkick.com/)
------------------------------------------------------------------------
FFMG's Profile: http://www.httppoint.com/member.php?userid=580
View this thread: http://www.httppoint.com/showthread.php?t=23023

Message Posted via the webmaster forum http://www.httppoint.com, (Ad revenue sharing).

Dec 9 '07 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.