Open link in a new tab
From semantic-mediawiki.org
Fragment of a discussion from Help talk:Datatables format redirect
A possible solution comes to my mind now: Have a look at the "LinkTarget" extension that I think will be able to help you here since datatables has a class of it's own (srf-datatables
) you can work on.
I did some tests using the extension but with no success. I tried also this snippet source:
$( function () { $( '#mw-content-text' ).on( 'click', '.srf-datatables > a', function () { var otherWindow = window.open(); otherWindow.opener = null; otherWindow.location = this; return false; } ); } );
It seems to work better (using classes as attributes in <span>
); anyway using srf-datatables
(and also the newer smw-datatable
) nothing changes, links are always open in the same tab.
I don't know if I am doing something wrong or simply this cannot be achieved.
Thanks for your help anyway!
Lorenzo