Skip to content

Comment on Israeli Mossad launches cyber challenge

Comments

This site loads the jQuery library in order to...

1. Access $("#text1")[0].innerHTML

2. $( document ).ready() { typeWriter (); }

facepalm

It's done like that because the typeWriter effect is actually rendering line break elements (<br>) as it shows up.

woosh, loading jQuery to access an element is not needed. document.getElementById would suffice.

jQuery is still a valid way to manipulate the DOM. There’s nothing wrong with doing that, especially if you already need to load jQuery for something else. I don’t think this is what the comment was referring to.

There's no reason to load a 30KB JavaScript library for such a simple webpage. See http://youmightnotneedjquery.com/

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.