XHTML 1.0 Strict valid target="blank" attribute


/ Published in: jQuery
Save to your folder(s)

The target="blank" attribute is not valid XHTML 1.0 Strict.
using jQuery, you can achieve the same functionality without having validation problems.


Copy this code and paste it in your HTML
  1. $("a[@rel~='external']").click( function() {
  2. window.open( $(this).attr('href') );
  3. return false;
  4. });

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.