次のjQueryスクリプトは、私のサイトの他のjava/mootoolsスクリプトとの互換性の問題を作成します - それを行うために何かできますかもっとは互換ですか?jQueryスクリプト+互換性
<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>
注 - このスクリプトは、新しいウィンドウで外部リンクを開くように設計されています。