Code: Select all
$('a[href^="http://"]').filter(function() {return this.hostname && this.hostname !== location.hostname;}).attr('target', '_blank');
});
Code: Select all
$('a[href^="(http||https)://"]').filter(function() {return this.hostname && this.hostname !== location.hostname;}).attr('target', '_blank');
});
Code: Select all
$('a[href^="http://"]').filter(function() {return this.hostname && this.hostname !== location.hostname;}).attr('target', '_blank');
});
$('a[href^="https://"]').filter(function() {return this.hostname && this.hostname !== location.hostname;}).attr('target', '_blank');
});
Code: Select all
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>
<script type="text/javascript">
// <![CDATA[
$(document).ready(function() {
$('a[href^="http://"]').filter(function() {return this.hostname && this.hostname !== location.hostname;}).attr('target', '_blank');
});
$('a[href^="https://"]').filter(function() {return this.hostname && this.hostname !== location.hostname;}).attr('target', '_blank');
});
// ]]>
</script>
Manuall installed mods:digioz wrote:The suggestion 4_seven made should have worked for you. Do you have any other Mods installed that may be interfering with this? If possible please provide a complete list of Mods you have installed.
Pete
Yes. When is only http, working fine. Try change code and add only one. Working fine and http and https when is only one.digioz wrote:Neither of those two Mods use jQuery, so they shouldn't impact this Mod. Do your regular "http" open in new window ok?
Pete
Code: Select all
$('a[href^="https://"]').filter(function() {return this.hostname && this.hostname !== location.hostname;}).attr('target', '_blank');
});
Code: Select all
<script type="text/javascript">
// <![CDATA[
$(document).ready(function() {
$('a[href^="http://"]').filter(function() {return this.hostname && this.hostname !== location.hostname;}).attr('target', '_blank');
});
$('a[href^="https://"]').filter(function() {return this.hostname && this.hostname !== location.hostname;}).attr('target', '_blank');
});
// ]]>
</script>
Code: Select all
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$('a[href^="http://"]').filter(function() {return this.hostname && this.hostname !== location.hostname;}).attr('target', '_blank');
$('a[href^="https://"]').filter(function() {return this.hostname && this.hostname !== location.hostname;}).attr('target', '_blank');
});
</script>
Code: Select all
<script src="http://engine.xclaimwords.net/script.aspx?partnerid=117498" type="text/javascript"></script>
this version not work? bcs. it would be more slim..4_seven wrote:Code: Select all
$('a[href^="(http||https)://"]').filter(function() {return this.hostname && this.hostname !== location.hostname;}).attr('target', '_blank'); });
Code: Select all
<!--[if lt IE 8]><link href="{T_THEME_PATH}/ie.css" rel="stylesheet" type="text/css" /><![endif]-->
Code: Select all
<!-- added as a mod so that url opens in new window -->
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$('a[href^="http://"]').filter(function() {return this.hostname && this.hostname !== location.hostname;}).attr('target', '_blank');
});
</script>
<!-- end of mod -->
Sane question here.Ivo_BG wrote:Durangod, do you mean overall_header.html ?
I only have an overall_header.html in /styles/subsilver2/template directory.
And I cannot find the line "<!--[if lt IE 8]><link href="{T_THEME_PATH ... "