www.webdeveloper.com
Results 1 to 9 of 9

Thread: can't figure out how to turn off captions

  1. #1
    Join Date
    Jun 2004
    Posts
    133

    Question can't figure out how to turn off captions

    I'm modifying a gallery that has captions displayed along with the images, but I want to turn those off entirely. I just can't figure out how. Best I could manage was setting their font color to my background color and font size to 0. However, they still say "undefined" when you leave the mouse over the thumbnails (undefined because I didn't enter any captions).

    Here's a test page I uploaded:

    http://www.different-dimension.com/AliasJaneDoe/kittens/images.html

    You should be able to view all my source. Although godaddy seems to be having some problems right now. If the link doesn't work, let me know and I'll paste all my code.

  2. #2
    Join Date
    Oct 2003
    Location
    Andover, UK
    Posts
    945
    Can't see any captions, or JS errors.

  3. #3
    Join Date
    Jun 2004
    Posts
    133
    Quote Originally Posted by mitya View Post
    Can't see any captions, or JS errors.
    Like I said, I'd turned them to font color black, same as my background. I've switched them to white so they show up now. I want them gone, not just hidden (because I want to use a patterned background, and I don't want them showing when the thumbnails are hovered over).

  4. #4
    Join Date
    Oct 2003
    Location
    Andover, UK
    Posts
    945
    By the look of it, kill the following line in galleria.js:

    Code:
    _wrapper.siblings('.caption').text(_thumb.attr('title'));

  5. #5
    Join Date
    Jan 2009
    Posts
    3,346
    This part might be of interest:
    // add the title attribute
    _thumb.attr('title',_title);
    Might try something like:
    Code:
    if(_title !=undefined){
    _thumb.attr('title',_title);
    } else {
    _thumb.attr('title','');
    }
    And this might be where it adds the caption (should be fixed from the above but if not a similar thing might work):
    // insert the caption
    _wrapper.siblings('.caption').text(_thumb.attr('title'));

  6. #6
    Join Date
    Jun 2004
    Posts
    133
    Quote Originally Posted by mitya View Post
    By the look of it, kill the following line in galleria.js:

    Code:
    _wrapper.siblings('.caption').text(_thumb.attr('title'));
    I tried that before. Deleting that line makes the thumbnail scroll stop working.

  7. #7
    Join Date
    Jun 2004
    Posts
    133
    Quote Originally Posted by criterion9 View Post
    Might try something like:
    Code:
    if(_title !=undefined){
    _thumb.attr('title',_title);
    } else {
    _thumb.attr('title','');
    }
    Adding that seems to do nothing. *scratches head*

  8. #8
    Join Date
    Jun 2004
    Posts
    133
    update:

    I managed to kill the numbers in the caption with

    Code:
    $('.caption').text($('.caption').text().substring(2));
    before
    return false;
    in mycarousel_initCallback function

    And putting just a space as the caption rather than leaving it blank makes it stop saying "undefined". However, when the mouse pointer is over a thumbnail, it still shows the number (with a space after it). Is there maybe a way to just turn off all the hover pop-up text stuff on all the images on a page?

  9. #9
    Join Date
    Jun 2004
    Posts
    133
    Actually, I was wrong, that code didn't kill the numbers from the captions entirely. There are still ":" on the images after ten.

    edit: more messing with the code seems to have killed the rest of the colons, but the pesky numbers on the thumbnail hovers remain
    Last edited by AliasJaneDoe; 12-30-2009 at 09:16 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles