1. #1

    Registered
    27/10/12
    Location
    Oost-Vlaanderen
    Posts
    4,212
    iTrader
    12 (93%)
    Mentioned
    8 Post(s)
    Reputation
    4/50

    jQuery target new window

    Ik heb dit script aangepast en het werkt zeer goed vind ik: jQuery jPortilio Plugin Basic Example
    Echter, de linkjes zouden moeten geopend worden in een nieuw venster. Hoe doe ik dit aub?

    Code:
                <div id='jprt-1' class='container jprt-container'>
                    <div class='jprt-item' data-tags='nieuw' style="background: url('../images/patrick.jpg') no-repeat;" data-content-show='redirect' data-content-url='http://www.patrick.be/'>
                        <div class='jprt-hover'>
                            <h1>Patrick</h1>
                        </div>
                    </div>
                </div>
    no votes  

  2. #2

    Registered
    13/05/06
    Location
    Hoeselt
    Posts
    9,944
    iTrader
    48 (100%)
    Mentioned
    0 Post(s)
    Reputation
    0/72
    In de source van het script waarschijnlijk window.location(url); vervangen door window.open(url);
    no votes  

  3. #3

    Registered
    27/10/12
    Location
    Oost-Vlaanderen
    Posts
    4,212
    iTrader
    12 (93%)
    Mentioned
    8 Post(s)
    Reputation
    4/50
    Bedankt. Het is gelukt.

    var content_url = $(this).data('content-url');
    if(content_url !=null) {
    window.open.href = content_url;
    }

    -> window.open(content_url, '_blank');
    no votes  

  4. #4

    Registered
    14/08/10
    Location
    Diest
    Posts
    2,419
    iTrader
    1 (100%)
    Mentioned
    0 Post(s)
    Reputation
    8/16
    Merk op dat bepaalde browser deze "pop-ups" kunnen blokken.
    no votes  

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Log in

Log in