Initiate onclick faster than with document.onload
问题 I have html-pages with links where i want to attach a function to their onclick-event. One way to do it is of course: <a href="save.php" onclick="save(); return false;" rel="save">Save</a> But I know this is not the best practice. So instead I wait for window.onload, loop through the links and attach the save-function to the links with rel="save". The problem with this is that it waits until the whole page has finished loading which can be several seconds after the link is displayed and