how to add target _blank to print friendly link icon?

hi,in the view page, when users click on PRINTFRIENDLY, the page is not opened in another tab.
i looked at the code and the generated link did not have the blank attribut.so, i went into the client script start page and add this JS to complete the a link with the missing attribute:$(‘.btn btn-default.ew-export-link.ew-print’).attr(‘target’,‘_blank’);but, nothing happened.what did i miss ?

amiens80 wrote:

$(‘.btn btn-default.ew-export-link.ew-print’).attr(‘target’,‘_blank’);

Your selector is wrong, try:
$(‘.ew-print’).attr(‘target’, ‘_blank’);

thank you.
your solution worked too.but in my case i forgot a dot in the selector, it also work with :$(‘.btn.btn-default.ew-export-link.ew-print’).attr(‘target’,‘_blank’);Best regards

Where to put this code ?

You may put it in Startup Script section of the current page.