target = _blank fix


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

<a> instead of <a> to get that green mark in your validator


Copy this code and paste it in your HTML
  1. function openInNewWindow(target) {
  2. $(target + " a[rel='blank']").each(function() {
  3. $(this).attr({
  4. href: "javascript:window.open('" + $(this).attr("href") + "');void(0);",
  5. title: "Link opens in new window/tab"
  6. });
  7. });
  8. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.