Results 1 to 2 of 2

Thread: CSS Smart Image Enlarger - Disable Link Click?

  1. #1
    Join Date
    Jan 2011
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default CSS Smart Image Enlarger - Disable Link Click?

    I think the CSS Smart Image Enlarger is really great however I don't want it to open the photo as a link to a new page,.. I just want the rollover effect. Would anyone be kind enough to share a script to disable that link ? Thank you.

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    29,165
    Thanks
    44
    Thanked 3,240 Times in 3,201 Posts
    Blog Entries
    12

    Default

    If you mean:

    http://www.dynamicdrive.com/style/cs...mage_enlarger/

    You could make the link:

    Code:
    <div class="ienlarger"><a href="http://www.dynamicdrive.com/"><img src="http://img406.imageshack.us/img406/4920/63734582.jpg" alt="thumb" class="resize_thumb" /><span>
        <img src="http://img406.imageshack.us/img406/4920/63734582.jpg" alt="large" /><br />
        Some text can go here.</span></a></div>
    like (zooming in on the highlighted part and changing it):

    Code:
    <a href="javascript:void(0);" onclick="return false;">
    That way, with javascript enabled it will return false and do nothing. With javascript disabled the browser will recognize it as a javascript link and do nothing. So, either way, you're covered - the link won't fire, and the CSS Smart Image Enlarger still works.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •