WordPress.org

Ready to get started?Download WordPress

Forums

iTunes Lookup Widget
[resolved] A Href targets (14 posts)

  1. vandyckth
    Member
    Posted 1 year ago #

    I would like to know if it is possible to give the 'a hrefs' that are used in the plugin (those that link to iTunes itself) a target to open them in a new tab. Haven't found this yet, can you help me please?

    Thanks!

    PS: I really love your add, by the way.

    http://wordpress.org/extend/plugins/itunes-lookup-widget/

  2. ollybach
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    this has not been implemented (yet anyway).

    as a quick fix, you could add the following to any of your themes js files.

    jQuery(document).ready(function($){
    	$(document).on('click', '.ilw-ini>div>ul>li>p>a,.ilw-ini>div>ul>li>p>span>a,.ilw-tracklist>p a,.ilw-tracklist>div>ul a', function(e){
    		e.preventDefault();
    		window.open(this.href);
    	})
    })

    i haven't thoroughly tested this , but give it a go.
    if enough people want this feature, I'll update the plugin and make it a selection in the settings.

    hope that helps, but let me know if you need more

    olly

  3. vandyckth
    Member
    Posted 1 year ago #

    This doesn't seem to work. I just copy-pasted the code above into the 'functions.js'-file that came with the Theme I'm using. Is there anything else I can try?

    Tnx!

  4. ollybach
    Member
    Plugin Author

    Posted 1 year ago #

    what theme are you using ?

  5. vandyckth
    Member
    Posted 1 year ago #

    I'm jusing Inovado:
    http://inovado.mintithemes.com/

  6. ollybach
    Member
    Plugin Author

    Posted 1 year ago #

    i'll see what i can do. bear with me for a day or so (or maybe even later today)

  7. vandyckth
    Member
    Posted 1 year ago #

    Take your time, it ain't urgent. And many thanks in advance!

  8. ollybach
    Member
    Plugin Author

    Posted 1 year ago #

    thanks.

    i might just put that into an update of the plugin in the next few days.
    seems to be a better way of doing it than trying to come up with a hack based on an individual theme

    ....

  9. vandyckth
    Member
    Posted 1 year ago #

    That would be wonderfull! You'll get a 5-star rate, for sure!

  10. ollybach
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    version 0.5 should now allow you to open links in a new window (under affiliate settings)

    whilst doing this i actually did quite a bit of a tidy-up. I don't think there should be any problems updating (i have tested it quite a bit) but if you find any issues, let me know.

    also, regarding the open links in new window issue that started this thread, there are different ways of doing this, so if you have problems , let me know. It's easy to change to another way

    hope that helps

  11. vandyckth
    Member
    Posted 1 year ago #

    Works like a charm, tnx very much!

  12. ollybach
    Member
    Plugin Author

    Posted 1 year ago #

    good stuff....do i get a rating then ? :)

  13. vandyckth
    Member
    Posted 1 year ago #

    I just gave you a 5-star rating! :)

  14. ollybach
    Member
    Plugin Author

    Posted 1 year ago #

    thanks
    appreciated - makes me feel all warm and fuzzy...... :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic