techtek / steempi

Steemit LED notifications and Web interface for Raspberry Pi
9 stars 9 forks source link

jquery is loaded 3 or 4 times #3

Closed dehenne closed 7 years ago

dehenne commented 7 years ago

https://github.com/techtek/steempi/blob/master/index.html#L33 https://github.com/techtek/steempi/blob/master/index.html#L52 https://github.com/techtek/steempi/blob/master/index.html#L87

First: Please load only one jquery ;-)

Second: If I see it right you do not really need jquery.

You use mostly events or CSS selectors. You can rewrite it.

$("#hide") = document.getElementById('hide');
$('body') = document.body
$('nav a') = document.querySelectorAll('nav a')
$('.tooltip') = document.querySelectorAll('.toltip') 

In v2, You should skip jquery, that eats up your performance.