Open link in a new window JAVASCRIPT

Hi,

I used this code suggested by you to make the feature box of X-Theme clickable. But, the link opens in the same window. I would like it to open in a new window or tab. How do I do that?

jQuery ( function( $ ) {

$('.x-feature-box-text a:last-child').each( function() {

$( this ).parent().parent().parent().find('.x-feature-box-graphic-inner i').wrap( '<a href="' + $( this ).attr('href') + '"></a>' );
$( this ).remove();

} );

 } );

I used the function Open in a new window in the X’Theme, but it doesn´t work.

Thanks in advance,
José Luis

Hi José ,

To make it open in new window, kindly change the code to this.

jQuery ( function( $ ) {

$('.x-feature-box-text a:last-child').each( function() {

$( this ).parent().parent().parent().find('.x-feature-box-graphic-inner i').wrap( '<a target="_blank" href="' + $( this ).attr('href') + '"></a>' );
$( this ).remove();

} );

 } );

Hope that helps

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.