使用jQuery的空白目标链接
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了使用jQuery的空白目标链接相关的知识,希望对你有一定的参考价值。
/** * Convert the links with rel="external" * * v. 0.1 Updated (07/02/11) * - Changed de CSS selector adding the posibility to external wasn't the only string in rel * attribute. * - Changed de string from "extern" to "external", that's looks more adequate. * */ function initRelLinks(){ jQuery('a[rel*="external"]').click(function(){ jQuery(this).attr('target', '_blank'); }); }
以上是关于使用jQuery的空白目标链接的主要内容,如果未能解决你的问题,请参考以下文章