$id() - Shortened document.getElementById()

0
Reputation

Taken from https://websemantics.uk/archived/useful-javascript-functions/

"Saves repeatedly writing out document.getElementById('id'). Results are cached which speeds up repeat requests by 50%."

I really like this one, credit to Mike Foskett @ websemantics.uk

Version:



                            
    Kyle

    Kyle

    OneLib developer/administrator
    There is 1 person using this snippet in their library: