Can I rely on these values?

garycwynne's Avatar

garycwynne

09 Dec, 2012 04:36 PM

Hi there,

I am using the following values:

    pinIt = pinIt.replace('{imgUrl}', encodeURIComponent(slideObject.imageLoader[0].src));
    pinIt = pinIt.replace('{imgDesc}', encodeURIComponent(slideObject.caption.text()));

I am relying on slideObject.imageLoader[0].src for the full URL of the image and slideObject.caption.text() for the image's ALT value. Am I using the correct values and if so, that they are not likely to change?

Just want to sanity check my decisions :)

Many thanks.

  1. Support Staff 1 Posted by Dmytro Semenov on 09 Dec, 2012 06:16 PM

    Dmytro Semenov's Avatar

    Hi,

    Image is better to get via just: `slideObject.image , caption is correct.

    Dmitry

  2. 2 Posted by garycwynne on 09 Dec, 2012 07:06 PM

    garycwynne's Avatar

    Hi,

    slideObject.image doesn't provide the 'src' property and I use that because I specify the URL of the image to Pinterest.

    This is the reason I asked for the sanity check of my approach.

    Cheers!

  3. Support Staff 3 Posted by Dmytro Semenov on 10 Dec, 2012 07:08 AM

    Dmytro Semenov's Avatar

    Hi,

    What version are you using? Can you send me link to page you're working on?

    "image" should always work as it's parsed at initializaton, loader might not be available sometimes.

    Dmitry

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac