WordPress.org

Ready to get started?Download WordPress

Forums

oik-nivo-slider
[resolved] Change link target (4 posts)

  1. SpiritedOne
    Member
    Posted 1 year ago #

    I'm really loving this plugin, but not sure if I can the slider links can open in a new target window.

    Is this possible?

    http://wordpress.org/extend/plugins/oik-nivo-slider/

  2. gonzalom
    Member
    Posted 1 year ago #

    ok, so its no way an official way to do it. Its just a jquery code i made to get around this, until the developers fully support this option.
    Hope it helps!

    jQuery(document).ready(function() {
    	jQuery("#slider a img").each(function (i) {
    	  jQuery(this).parent().attr('target','_blank');
    	});
    });
  3. SpiritedOne
    Member
    Posted 1 year ago #

    Thank you so much for the js, gonzalom, but I'm not skilled enough to implement it, and need a little more help.

    I'm guessing I need to add the jquery to one of the .js files in the plugin, but they are all showing as (inactive) when viewed in the editor.

  4. bobbingwide
    Member
    Plugin Author

    Posted 1 year ago #

    Hi, with oik version 2.0 this is now possible using a new shortcode [bw_jq]. I wrote a slightly simpler version of the jQuery code, releasing the new version today (18th June 2013)

    See how this is done at http://www.oik-plugins.com/wordpress-plugins-from-oik-plugins/wordpress-plugins/oik-nivo-slider/oik-nivo-slider-faq/oik-nivo-slider-with-links-opening-in-new-window/

    The jQuery code I wrote is

    /**
     * (C) Copyright Bobbing Wide 2013
     * Simple jQuery to set links in the oik-nivo-slider to open in a new window.
     * Adds target="_blank" to any anchor tag (a) within the class of .nivoSlider
     */
    jQuery(document).ready(function() {
    	jQuery(".nivoSlider a").attr("target","_blank");
    });

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic