Welcome To Snipplr


Everyone's Recent JavaScript Snippets Tagged links



« Prev 1 Next »
Usage: <a href="http://www.whaterver-your-site-is-called.com/" rel="external">Some other site</a>
0 778 posted 12 years ago by Krummelz
Hopefully this covers just about everything. This code has far more lines than htmlify.js but seems to work ok. (I just remembered that " // Loop through the clear text " has no loop breaker - will post a fix, but it's not a show-stopper for mo...
0 973 posted 13 years ago by jm1248
The html attribute 'target="_blank"' for links is no longer valid code as of XHTML Strict 1.0. This code will run using mootools on domready to send all clicks to new windows when going to an external domain.
0 746 posted 14 years ago by birnamdesigns
In order to track links out Google requires you add this snippet of JavaScript to your anchor(a) tag. Replace /G1/example.com with whatever you want to use to identify the link.
1 669 posted 14 years ago by smoothdzion
1 740 posted 14 years ago by enchance
W3C no longer include the target attribute of the <a> tag in HTML 4.0 Strict and XHTML 1.0 Strict document types . To make links open new windows we will have to use Javascript, and with mootools it make this task very easy. Just add this snippet to...
0 680 posted 14 years ago by cherrywaves
There's been a popular trend to use JavaScript to add target="_blank" to anchors with rel="external". So in the name of making everything in my site Prototype based I worked out a script to do just that.
2 652 posted 15 years ago by fruehjahr
1 566 posted 15 years ago by iTony
Open a new window without using target="_blank" for XHTML 1.1. Need jQuery Framework : http://jquery.com/
15 1988 posted 17 years ago by walepinski
« Prev 1 Next »