PDA

View Full Version : Remove the hover bubble and right click warning?


crockett
Mar-13-2007, 08:54 AM
Hello,

I'm working my way through the following customize help page:

http://alwaysone.smugmug.com/help/customize-faq.mg

Removing and adding things as I see fit.

However, when I try the code for removing the hover bubble and the code for "right click warning" neither seem to work. The code is still on my page.

I'd appreciate it if someone could take a gander and if you figure it out please provide an explanation. I'm a programmer but not HTML so I take to this stuff pretty quick.

Thanks,

David

Ryan Armbrust
Mar-13-2007, 09:25 PM
/*HIDE MOUSE OVER TEXT ON PICS*/
function delHover() {
imgTags = document.getElementsByTagName("img");
for (i=0; i<imgTags.length; i++) {
imgTags[i].title = "";
imgTags[i].alt = "";
}
}

This is what I am using to hide the mouse over text on my site. Works like a champ. Copy and paste it into your javascript section.

crockett
Mar-14-2007, 03:48 AM
Thanks for the reply but this doesn't work.

I've also tried the code provided below and it doesn't work either. Also, the "right click warning" code taken straight from the FAQ doesn't seem to doing anything as well.

Anyone else got any ideas? Thanks.

/* Start code that removes the hover bubble over a photo */
function delHover() {
oLst = YD.getElementsBy(function(el) {return (YD.hasClass(el,'imgBorder') || YD.hasClass(el,'imgBorderOn'))},'img');
for (i=0; i < oLst.length ; i++) {
if (oLst[i].title && oLst[i].title != '') oLst[i].title = '';
if (oLst[i].alt && oLst[i].alt != '') oLst[i].alt = '';
}
}
YE.onContentReady('bodyWrapper', function() {if (!YD.hasClass(document.body, 'smugmug_ajax')) delHover()});
onPhotoShow.subscribe(function(){YE.onAvailable('m ainImage', delHover)});
/* End code that removes the hover bubble over a photo */