Results 1 to 6 of 6

Thread: adding hyperlink within Ultimate Fade-in slideshow descriptions

  1. #1
    Join Date
    Sep 2005
    Posts
    15
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default adding hyperlink within Ultimate Fade-in slideshow descriptions

    1) Script Title: Ultimate Fade-in slideshow (v2.4)

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...nslideshow.htm

    3) Describe problem: adding hyperlink within descriptions

    Hi,
    I would like to add a link within the description of the slide. When I include the link tag it disables the script altogether.

    Below is an example of what I would like to do in theory. I would appreciate your help with this.

    imagearray: [
    ["images/bh1.jpg", "", "", "<span class='caption-text'>I will get this project done on</span><a href="#" class="links">time</a>"],
    ["images/bh2.jpg"]
    ],

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    You cannot have like quotes inside a string delimited by those quotes, unless they're escaped. So you can:

    Code:
    imagearray: [
     ["images/bh1.jpg", "", "", "<span class='caption-text'>I will get this project done on</span><a href=\"#\" class=\"links\">time</a>"],
     ["images/bh2.jpg"]
     ],
    Or:

    Code:
    imagearray: [
     ["images/bh1.jpg", "", "", "<span class='caption-text'>I will get this project done on</span><a href='#' class='links'>time</a>"],
     ["images/bh2.jpg"]
     ],
    Or you could change the delimiting quotes, which would mean that you would have to change or escape those around the class value:

    Code:
    imagearray: [
     ["images/bh1.jpg", "", "", '<span class="caption-text">I will get this project done on</span><a href="#" class="links">time</a>'],
     ["images/bh2.jpg"]
     ],
    - John
    ________________________

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

  3. #3
    Join Date
    Sep 2005
    Posts
    15
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    Thank you John.

    I have another related question about the descriptions. When I try to add a <br /> tag in the description it disables the script and when I add a <p> tag the behavior is inconsistent. What is the best way to add a line break in this scenario?

  4. #4
    Join Date
    Sep 2005
    Posts
    15
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    Here is an example of the inconsistent <p> behavior for the descriptions.

    On this page, slide 1 shows the last line correctly in a paragraph, with no impact on the the slide. http://www.designculturestudio.com/b...roadhouse.html

    On this page, slide 1 shows the line in a paragraph, but the white background does not fill the entire slide. http://www.designculturestudio.com/b...fruitvale.html
    How do I get it to fill the entire slide? When the <p> is removed the white background fills the entire slide.

  5. #5
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    I have no trouble with <br>, perhaps you did something else (a typo?) at the same time that broke the script. I'd stay away from p. It is unpredictable, even in ordinary HTML. The div element seems OK.

    However, you needn't necessarily do anything like that. The text will wrap automatically if it needs to in order to fit. As various browsers will display fonts and dimensions slightly differently and the user's settings can make these differences dramatic, this is often the best approach. Using your own line breaks, what looks good in one browser may look very odd in another. You can center, right or left (the default) align and/or justify and/or indent the text.

    If you want more help:

    Please post a link to a page on your site that contains the problematic code so we can check it out.
    - John
    ________________________

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

  6. #6
    Join Date
    Sep 2005
    Posts
    15
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    Hi John,
    I posted the link to the page where the <p> tag is being problematic in my last post. But here it is again.
    I even tried a <br>. I should clarify that the tags are working fine, but for some reason it is affecting the white background, it's not filling the entire slide.

    The behavior is inconsistent because on this page it works fine
    http://www.designculturestudio.com/b...roadhouse.html
    but on this page it is affecting the background
    http://www.designculturestudio.com/b...fruitvale.html

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
  •