Came across this site while learning a bit of JavaScript, and looking for ways to do things without jQuery, which has become almost ubiquitous these days. Many, if not most JavaScript tutorials I've seen seem to rely on jQuery, and just assume you will be using it anyway -- and perhaps you should be -- but I felt like it was probably overkill for some of the stuff I wanted to try.
I've managed to write some relatively simple things without jQuery, such as a crappy, little static, client-side "search engine" for a Github Pages site, and a simple lightbox for displaying images and YouTube videos.
Indeed. I'm not against jQuery, as it's a great library as far as I understand it, but like the site title says, you/I may not really need it. I haven't so far.
It works essentially the same as Simple Jekyll Search. It just searches through a JSON file containing relevant data (title, post date, tags, category, etc) for each post/page on the site, and returns the entries best matching your query. My version is nowhere near as polished as Simple Jekyll Search, but it seems to work fine. Here is my little test page (the "post data" in this case is "fake", and is just a few adventure game titles):
The code is sloppy, as it's just a test, but I'm sure you can get the gist of it. I've cleaned it up a bit since uploading that version.
Also, I'm still learning, so cut me some slack if I've done some things the hard way, or just plain wrong.
Edit:
I may update the page sometime today, so it may change/break.
Edit 2:
Updated the page. Changed a number of things in terms of JS, and added a little more "post data". Seems to work on my laptop, using Firefox, and on my Android tablet, using Chrome.
IE8 isn't dead, it lives on on internal corporate networks managed by assholes, who entirely deserve being billed through the nose to have any development done for them for it.
Why you would want to learn enough JS to do webdev is beyond me. JS is terrible. Let the standard improve and in the meantime use an API that makes the language sane. Letting jQuery gain so much power puts pressure on the standards org to force companies to work together more to improve the standard. If I were to make a lib that made JS usable, it would be jquery. IMO! :D
Again, I'm not (and I don't think the page is) trying to deter anyone from ever using jQuery. I think the point of the page is that you may not need it if all you need to do is some simple tasks.
And I don't know enough about JS or web development in general to say whether JS is insane or not. I haven't really had any troubles grasping the basics. But that's just the basics. Maybe it gets stupid with complex projects.
16 comments
1 u/GrislyAtoms [OP] 18 Oct 2015 00:40
Came across this site while learning a bit of JavaScript, and looking for ways to do things without jQuery, which has become almost ubiquitous these days. Many, if not most JavaScript tutorials I've seen seem to rely on jQuery, and just assume you will be using it anyway -- and perhaps you should be -- but I felt like it was probably overkill for some of the stuff I wanted to try.
I've managed to write some relatively simple things without jQuery, such as a crappy, little static, client-side "search engine" for a Github Pages site, and a simple lightbox for displaying images and YouTube videos.
2 u/0x7a69 18 Oct 2015 01:01
omg I see this so much I pretty much google with -jquery all the time now to avoid that crap.
1 u/GrislyAtoms [OP] 18 Oct 2015 01:11
Indeed. I'm not against jQuery, as it's a great library as far as I understand it, but like the site title says, you/I may not really need it. I haven't so far.
2 u/ErrorFoxDetected 21 Oct 2015 20:35
I really want to see how you did a crappy client search engine. xD Link?
0 u/GrislyAtoms [OP] 21 Oct 2015 21:42
It works essentially the same as Simple Jekyll Search. It just searches through a JSON file containing relevant data (title, post date, tags, category, etc) for each post/page on the site, and returns the entries best matching your query. My version is nowhere near as polished as Simple Jekyll Search, but it seems to work fine. Here is my little test page (the "post data" in this case is "fake", and is just a few adventure game titles):
https://trebek.github.io/gittest/
and the source:
https://github.com/Trebek/gittest/tree/gh-pages
The code is sloppy, as it's just a test, but I'm sure you can get the gist of it. I've cleaned it up a bit since uploading that version.
Also, I'm still learning, so cut me some slack if I've done some things the hard way, or just plain wrong.
Edit:
I may update the page sometime today, so it may change/break.
Edit 2:
Updated the page. Changed a number of things in terms of JS, and added a little more "post data". Seems to work on my laptop, using Firefox, and on my Android tablet, using Chrome.
0 u/squishysquid 18 Oct 2015 02:20
IE8 isn't dead, it lives on on internal corporate networks managed by assholes, who entirely deserve being billed through the nose to have any development done for them for it.
0 u/brianmoore 20 Oct 2015 04:54
Why you would want to learn enough JS to do webdev is beyond me. JS is terrible. Let the standard improve and in the meantime use an API that makes the language sane. Letting jQuery gain so much power puts pressure on the standards org to force companies to work together more to improve the standard. If I were to make a lib that made JS usable, it would be jquery. IMO! :D
1 u/GrislyAtoms [OP] 20 Oct 2015 05:50
Again, I'm not (and I don't think the page is) trying to deter anyone from ever using jQuery. I think the point of the page is that you may not need it if all you need to do is some simple tasks.
And I don't know enough about JS or web development in general to say whether JS is insane or not. I haven't really had any troubles grasping the basics. But that's just the basics. Maybe it gets stupid with complex projects.