Tagged: 

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #16806

    Hi,

    I would like to open all project urls in a new window/tab.

    < a href=”http://www.someurl.com” target=”_blank” >

    Any ideas?

    Thanks. ;)

    #92937

    Propably the easiest solution is to use jquery – open up js/avia.js and replace following code:

    jQuery(document).ready(function(){

    with

    jQuery(document).ready(function(){
    jQuery(".portfolio-entry a, .single-portfolio-entry a, .portfolio-meta-value a").filter(function() {
    return this.hostname && this.hostname !== location.hostname;
    }).attr('target', '_blank');

    #92938

    Thanks for your answer. Now it works fine on the portfolio-item pages like this one here:

    http://www.kriesi.at/themes/eunoia/portfolio-item/nice-image/

    But not on the page where you will get when you first click on one portfolio item in the filterable portfolio gallery (this nice popup/overlay style).

    http://www.kriesi.at/themes/eunoia/template-files/portfolio-4-columns/

    So only one step left to perfection! ;)

    #92939

    Hi!

    I adjusted the code a bit. Please try it again.

    Best regards,

    Peter

    #92940

    Thanks for your help but unfortunately it makes no difference.

    On this overlay style page it still do not work:

    http://imageshack.us/a/img856/5595/screenshot20121005at449.png

    #92941

    Try following – revert the changes I posted above and replace following line in avia.js:

    if(typeof container == 'undefined'){ container = 'body';};

    with:

    if(typeof container == 'undefined'){ container = 'body';};

    jQuery(".portfolio-entry a, .single-portfolio-entry a, .portfolio-meta-value a").filter(function() {
    return this.hostname && this.hostname !== location.hostname;
    }).attr('target', '_blank');

    #92942

    Thanks a lot, works beautifully now! :)

    Best regards

    keyhanjun

    #92943

    Hey,

    Glad it worked.

    Regards,

    Ismael

Viewing 8 posts - 1 through 8 (of 8 total)

The topic ‘Project URL / open in new window/tab’ is closed to new replies.