Archive for Javascript

jQuery Chosen fork

// januari 16th, 2012 // No Comments » // Development, Javascript, jQuery, plugin, script

Today I forked the jQuery plugin Chosen. The original code used some dirty code to show and hide the list-items and there were some additional options I added. Now it’s possible to specify if you want to hide or show the search field (default its off) and if you want the search function to look for you query string at the beginning of the list-item label, or wherever.

If you’re using Chosen in combination with SpModal, it’s now possible to have the Chosen list come out of the modal window, using this style:

<style>
#sp-modal-container { overflow: visible !important; }
#select_pln_chzn { position: absolute; }
</style>

Chosen + SimpleModal

search_enabled and search_at_start pretty much speak for themself.

Fork: https://github.com/klaascuvelier/chosen

So, I made a clock

// oktober 24th, 2010 // 4 Comments » // Cuvedev, Development, Javascript

So yes, I made a clock. In JavaScript (and HTML).
It’s not just another JavaScript analog or digital clock, it’s actually a clock which is easy to read and it’s based on this design: QLOCKTWO by Biegert&Funk.

I think it’s a cool way to display time. When I considered buying the clock, I was shocked when I saw the price. So I though it would be a nice challenge to make it myself, in JavaScript.

Here is the result:

And you can see it in action here.

I am in particular proud of the JavaScipt code. The clock is “built” with text predefined text strings, and right strings are highlighted using a “logic” for the selected language. In this way it is fairly easy to add new languages (at this time only Dutch and English are available). I used the PrototypJS-library because I’m used to it, and it shortened my code drastically.

Tested in:
- Google Chrome 8
- Firefox 3.6 and 4.0
- Safari 5
- Internet Explorer 8

Update:
And this is what it looks like on an iPad:

still pretty expensive for “just a clock”, but already cheaper than the qlocktwo.