jQuery.durationpicker plugin

[Important Notice: I’ve discovered some bug in demo of durationPicker. It runs correctly only in FF. I will fix it soon and notify you here.]   Have you ever looked at Googles’s (excellent) calendar app and wished that you had the  ‘event planing widget’ in your web form? Well, here is my own version, a reversed engineered one, which I give for free use. It was originaly developed for company I work for, and was not intended to be a completely standalone plugin, so there are still some dependencies. More on that later. Basic functionality is quite the same as …

Continue Reading

console.log() problem solved

console.log(),  console.debug()..  my two favourite helpers. If I need check whether my jquery selector returns what I expect it to or just to check how some variable changes its value during script execution I often use console.  It’s great tool. Google Chrome provides it by default, Firefox only when you have Firebug turned on and IE likewise. If there is no console object available, then Javascript throws an Error and stops execution. Console should be used in developement enviroment only, where you can be sure that console is turned on. But sometimes it is good to keep it, at least …

Continue Reading

Fun with Dojo animation

Best way to learn is by doing. About a year ago when I needed to learn Dojo I created this simple animation. It is also my tribute to Avatar movie.  Click the image to see it in action. It looks really cool on full screen [press F11] 🙂 How it works When page loads dojo.addOnLoad() fires callback function. First it calculates dimension of the <img> used as background. In this case Avatar wallpaper.  Then it creates overlay <div> with same dimension as background image and insert grid of tiles. Number of tiles is calculated dependending on their width and height …

Continue Reading

jQuery.datepicker – issue with duplicate ID

I have discovered (minor) issue with jQuery Datepicker plugin: It’s not actually datepicker’s fault, but it might be difficult to find it in a complex web page, so I decided to share it with you. Imagine that your application relies heavily on javascript, ajax, widgets etc… Widgets are created on the fly, and it happens is that two datepicker instances share the same ID. They might be generated from the same template (as was my case), or they dont have any ID at all, but were initaliazed in a certain way, more on this in future post. Here is a …

Continue Reading