waldyrious / primerpedia

Simplified extracts of Wikipedia articles, showing just the basic information.
https://primerpedia.toolforge.org
Other
11 stars 7 forks source link

store element references in variables instead of retrieving them each time #33

Closed Jan-Ka closed 6 years ago

Jan-Ka commented 6 years ago

There is nothing really gained from searching the nodes each time you want to use them. I guess this was done because jQuery does not reliable return Live Nodes (not sure, can't remember) but in native JS we can do it.

Also it makes the code a tad more concise :)