How can I remove an inline onclick attribute with a bookmarket?

Posted by Eric on Stack Overflow See other posts from Stack Overflow or by Eric
Published on 2010-04-01T17:02:53Z Indexed on 2010/04/01 17:13 UTC
Read the original article Hit count: 296

There is an annoying website out there that foils attempts to "open in new tab" by using <div onclick=> instead of <a href=>. I've written a bookmarklet, using jQuery, that creates a wrapper <a> tag and inserts it within the <div> around its content.

How can I remove the original onclick handler?

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about JavaScript