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 524 posted 10 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 695 posted 11 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 545 posted 12 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 463 posted 13 years ago by smoothdzion
1 532 posted 13 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 525 posted 13 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 460 posted 13 years ago by fruehjahr
1 400 posted 14 years ago by iTony
Open a new window without using target="_blank" for XHTML 1.1. Need jQuery Framework : http://jquery.com/
15 1320 posted 16 years ago by walepinski
« Prev 1 Next »