Thread: jQuery target new window
-
05-06-2015, 09:32 #1Banned
- 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
-
-
05-06-2015, 11:01 #2Banned
- 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
-
05-06-2015, 11:20 #3Banned
- 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
-
07-06-2015, 13:07 #4Deactivated user
- 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
