1 October 06
As some people know, when it comes to Javascript libraries, my colours are firmly nailed to the jQuery post. It’s a nice little library that’s dead powerful – which is why I’ve made quickSearch.
quickSearch is a jQuery plugin for filtering large sets of data. It’s very easy to use ‘out of the box’. As easy as:
$(id_of_input).quicksearch(search_elements, options);
I’ve made a very basic homepage for it, which has a couple of demostrations and code examples:
http://rikrikrik.com/jquery/quicksearch/
Any feedback would be great received. If you think it’s really shit and doesn’t work very well, then please please tell me!
Enjoy this? Subscribe to the feed for the very latest updates.
Very nice Rik! I’m impressed. From the top of my head I cannot yet think of any real-life uses for such a search (taking into account limitations of table/list/etc. size, but I’m sure there would be many given thought.
I’ve never actually used a javascript library. Hand-coded everything i’ve done from the ground up. Owing to all the good press ive heard about jQuery though I may take a look :). How long did it take you to get into it?
Hi Steve,
The quickSearch actually come out of a project I’m currently working on. It basically is a large file storage area, so they need some way of finding things – we thought that the best way would be to filter using Javascript as it’s quicker and easier than sending a server request. I’m also looking in to combining it with the tableSorter plugin so I can have a beast of a sorter
It’s definitely worth looking into JS libraries, they provide quick and easy ways of coding difficult things – for instance, I think you could do your sites dropdown menu thing in about 5-6 lines of jQuery.
Bloody hell. Wish i’d had this conversation 6 months back ;)
Only problem is that kinda takes the fun outta programming and web development. Not to meantion the “I did this myself” factor. Still, for normal client jobs where keeping the money rolling is the main factor, as opposed to personal weblogs, it’s perfect.
Well, I definitely wouldn’t say it takes the fun out of programming – in fact, I’ve been enjoying Javascript a lot more since using jQuery. I use it on client jobs too, it speeds up my programming time immensely. Why write three lines of document.getElementById when you can write $(’#id #id2 #id3’) to select the same thing?
Do you not think that using libraries for everything ultimately leads too a lack of knowledge of how to write in the bare programming language? I can imagine a large number of people who ONLY write using a library either forgetting the orignal commands, or not even learning them in the first place. After all why should they?
I can totally see the point of libraries, but I could see myself becomming reliant on them eventually, were I to use them for everything. I’m just playing devil’s advocate here.
I see where you’re coming from, but like with Rails for instance, just because it’s easier to code, doesn’t mean people’s programming understanding decreases. Both ways achieve the same goal. I would say that jQuery or any JS library is not like coding Javascript, but a quicker way of programming browser interactions
After finding a good practical use (wouldnt you know it!) I had a go at my own one of those search scripts, using traditional JS (see http://www.stevetucker.co.uk/page-archive.php). I did it in about 80 lines of JS code – pretty weightly next to yours with jQuery I imagine – but it’s much cleaner than your example with no inline javascript. Additionally the form is created on the fly too, and the search can be instigated on tables/ols/uls/dls (multiple on one page capable) simply by giving the element to be searched a class. All in all took about 3-4 hours – probably a fair bit longer than it took you with jQuery. Take a look.
pf45KI vpkrtbqsybgf, [url=http://fgetybntfbpu.com/]fgetybntfbpu[/url], [link=http://iljhjrqvoymh.com/]iljhjrqvoymh[/link], http://vublrgnjakca.com/
Comment by James on 2 October 2006, 09:22
Looks great Rik – congratulations!