This id="bottomNavClose"
business in your link can do no good here, please get rid of it.
What you want to execute is:
But where and when? The answer of course is when the generated link is clicked, not when the activating link (what you have in your previous post) is clicked. To do this we need to edit the lightbox.js file. It should be here (around line #361 in that file):
Code:
function getImageTitle(anchor){ //DynamicDrive.com added function that allows the caption("title") to be linked ("rev").
var ddimageTitle=anchor.getAttribute('title')
var ddimageTitleURL=(ddimageTitle!=null && ddimageTitle!="")? anchor.getAttribute('rev') : null
return ddimageTitleFinal=(ddimageTitleURL!=null && ddimageTitleURL!="")? '<a href="'+ddimageTitleURL+'" class="ddcaptionurl">'+ddimageTitle+'</a>' : ddimageTitle
};
Find that section in the lightbox.js file and make it like so (addition highlighted):
Code:
function getImageTitle(anchor){ //DynamicDrive.com added function that allows the caption("title") to be linked ("rev").
var ddimageTitle=anchor.getAttribute('title')
var ddimageTitleURL=(ddimageTitle!=null && ddimageTitle!="")? anchor.getAttribute('rev') : null
return ddimageTitleFinal=(ddimageTitleURL!=null && ddimageTitleURL!="")? '<a onclick="myLightbox.end();return true;"
href="'+ddimageTitleURL+'" class="ddcaptionurl">'+ddimageTitle+'</a>' : ddimageTitle
};
This is untested. So if you have problems with it let me know and:
Please post a link to a page on your site that contains the problematic code so we can check it out.
Bookmarks