简体   繁体   中英

Hide Image Title Tool Tip Popup on Mouse Rollover or Hover

I'm hoping I can get this question answered here...

I have a client who wants to add a PayPal "Add to Cart" button inside a Lightbox window. I was able to achieve this by placing the PayPal code inside the image title tag.

Not sure if this was the best way, but it worked.

However, here is my problem...

Now when you mouse over the image thumbnail the image title tooltip popup displays the PayPal code. Not good...

Is there a way to disable this feature? Can I tell browsers to not display this popup?

Here is the link (I only applied the code to the first two photos):

http://lancemissionart.com/index.php?Page=gallery&title=fof&gallery=msd

Thanks!

Thinbox它不再维护了!

You should change from using Lightbox to Thickbox (looks like you might be experimenting with it in your code). Lightbox is for images only (even though you've made it work its pretty ugly putting all that in the title tag and pretty wrong), Thickbox will let you include your form.

http://jquery.com/demo/thickbox/

I would modify lightbox to use a different attribute instead of title, like paypalForm. Modification on line 398 of lightbox.js.

398: imageArray.push(new Array(anchor.getAttribute('href'), anchor.getAttribute('paypalForm')));

The other option would be to only set the title attribute onMouseDown and setting it back to empty string when the lightbox is closed.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM