open() code using the URL pulled from the value of the href attribute. The href attribute is then removed from the link. I have to say that I like your code but I wanted the same effect but with less. So this is what I used on a project that I am updating. (function() (.targetBlank).click(function() window.open(this.href) return false Open a new window called "MsgWindow", and write some text into it: var myWindow window.open("", "MsgWindow", "width200,height100") myWindow.document.write("