Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript jQuery Flickr feed Plugin: How to open an image in new window?

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #41581
    mrto2
    Member

    Using a jQuery Flickr Feed Plugin from http://www.gethifi.com/blog/a-jquery-flickr-feed-plugin.

    They are using “opening image in parent window” where we can see only image and one of other option is in lightbox.

    But how can we open a flickr photo in new window while the link should be its original flickr page..

    #119092
    tylerhq
    Member

    Open a link in a new window with the target attribute:

    <[a] href="//google.com" target="_blank">Google in New Window

    Google in New Window

    For your case, you’d want to add that attribute to the template:


    $('#basicuse').jflickrfeed({
    limit: 14,
    qstrings: {
    id: '[email protected]'
    },
    itemTemplate:
    '
  • ' +
    '<[a] href="{{image_b}}" target="_blank"><[img]src="{{image_s}}" alt="{{title}}" />' + '
  • ' });

    I apologize for the braces [], as CSS-Tricks is processing the code within a code block.

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.