SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Member
    Join Date
    Oct 2007
    Location
    Los Angeles, CA, USA
    Posts
    17
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Code is appearing on page-need Jquery fix

    Hi,
    In the Portfolio Module of Business Catalyst (see this page: Portfolio, I have the thumbnail of the websites and when clicked it enlarges with the description underneath. However, I would like the description to actually be a link that when clicked will take the visitor to the actual website depicted in the image. I tried to surround the text with the <a href> tag, but the code actually appears on the page.

    I asked the person at BC, and this is their reply:
    You can use in the description the following code in order to create a link:
    Name of Site (<a href='nameofsite.com'>nameofsite.com</a>)
    When you display the photo the link will be rendered correctly: 2011-06-09_1055 - AleXtyle's library. The only problem will with the tooltip of the picture which will display the actual code: 2011-06-09_1057 - AleXtyle's library. However you can use some Jquery in order to remove or to change the "ALT" of the picture.

    So, does anyone know what code they are referencing and where this code would be placed? Their site forum has not been able to help.
    Thanks so much for your assistance!
    Cheers,
    Janell
    Last edited by s. janell; Jun 14, 2011 at 14:15. Reason: word change

  2. #2
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,678
    Mentioned
    99 Post(s)
    Tagged
    4 Thread(s)
    I believe that what they mean by "use in the description" is the alt text of the thumbnail image itself.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  3. #3
    SitePoint Member
    Join Date
    Oct 2007
    Location
    Los Angeles, CA, USA
    Posts
    17
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Paul,
    The exact same text is used for the Title tag and the Alt tag. For each image there is "Site Name Description (website.com)". I would like the (website.com) to become the link.

    Since this is a CMS, each image has a "box" and that box they call the description, and that is what is used for the Title and Alt tags.
    Thanks so much,
    Janell

  4. #4
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,678
    Mentioned
    99 Post(s)
    Tagged
    4 Thread(s)
    Quote Originally Posted by s. janell View Post
    Hi Paul,
    The exact same text is used for the Title tag and the Alt tag. For each image there is "Site Name Description (website.com)". I would like the (website.com) to become the link.

    Since this is a CMS, each image has a "box" and that box they call the description, and that is what is used for the Title and Alt tags.
    Thanks so much,
    Janell
    So you'll need to update the website.com part of the alt text as was explained to you by the person at BC.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  5. #5
    SitePoint Member
    Join Date
    Oct 2007
    Location
    Los Angeles, CA, USA
    Posts
    17
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Paul,
    Looks like I'll need to start over. I cannot get into the module's code (I know, I know, I asked Adobe-WHOLE other problem.) I was just hoping to find some JQuery/Javascript to add to the main page that holds the module, so the "alt" text would not display on the main page (as shown in the woman's screen capture- 2011-06-09_1057 - AleXtyle's library) and translate the "website.com" into a link when the gallery pic is enlarged- as shown here- 2011-06-09_1055 - AleXtyle's library..
    Thanks!
    Janell

  6. #6
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,678
    Mentioned
    99 Post(s)
    Tagged
    4 Thread(s)
    There might be the possibility of doing it in a complicated way, where the alt attributes are saved out to a global array, then a special strip_tags function is run on them to remove the links from the alt description, after which the fancybox events for onStart and onComplete are used to toggle between the saved original and the stripped one.

    That's one possible solution that you could have a go at.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  7. #7
    SitePoint Member
    Join Date
    Oct 2007
    Location
    Los Angeles, CA, USA
    Posts
    17
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Paul,
    You are going to make me learn how to fish yet, aren't you? You lost me at "complicated way..." :-)

    Let me think about this.
    Thanks!!!
    Janell


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
  •