3 ms·
var link = $('<a/>').attr('href', 'http://example.com)[0] http://example.com)[0] in jQuery, just to show how simple it can be. A stylistic point is I'd just c
by mmahemoff 15y ago
var link = $('<a/>').attr('href', 'http://example.com)[0] http://example.com)[0] in jQuery, just to show how simple it can be.
A stylistic point is I'd just call it something like "link". Assigning a link element to "parser" is being cute and it's not what the object actually is, even if it's being used with intent to parse.