PDA

View Full Version : Need to disable link to larger photo...


bloomphotog
Sep-10-2009, 01:36 PM
On this page (http://www.joshmartinezphotography.com/Charity/Charitb/9586228_CGmn8), I would like to remove the normal click through to a larger photo feature. Basically, just have all the images as static jpg's. Does that make sense?

Thanks!

Mohamed.Ghuloom
Sep-11-2009, 10:39 PM
Use this code

//-------------------------------------------------------------
// Clear links and thus clickability from photos in journal galleries
//-------------------------------------------------------------

YE.onDOMReady(ClearLinksFromMany);

function ClearLinksFromMany()
{
var listOfGalleries = [
"6874813", /* About us */
"6819351", /* Testimonials */
"6854847" /* Guestbook */
];
if (window.AlbumID)
{
for (var i in listOfGalleries)
{
if (window.AlbumID == listOfGalleries[i])
{
removeLinkFromImg();
break;
}
}
}
}

function removeLinkFromImg()
{
var oList = YD.getElementsByClassName("photo", "div");
for (var i=0; i < oList.length; i++)
{
var aTags = oList[i].getElementsByTagName("a");
for (var j=0; j < aTags.length; j++)
{
// get rid of the href on the <a> tag
aTags[j].removeAttribute("href");
// get rid of the alt and title tags on the <img> tag
aTags[j].firstChild.removeAttribute("alt");
aTags[j].firstChild.removeAttribute("title");
}
}
}


Make sure you change the gallery unique url code (in bold) to your own galleries unique url code.