Skip to content

{ Category Archives } jQuery

New flexcal

After some prompting by those actually using it, I paid more attention to my flexcal date picker plugin, adding features like buttons, drop-down menus and formatted dates. The documentation is on my github pages at, and the code is on github at All other posts about it are obsolete. The current stable version […]

Animating arbitrary values with jQuery

jQuery's animate is useful for animating CSS properties, but there are times that you want to take advantage of the bookkeeping that jQuery provides to animate, with easing functions etc., but not to change an animatable property. The flip plugin for Mike Alsup's cycle2 has a clever hack to animate some otherwise unused property instead: […]

New jquery.ui.subclass.js

I finally updated my jQuery widget subclassing code to use the newest version of jQuery UI, which incorporated a lot of the original ideas I outlined back in 2010. The new documentation is now on my github pages, and I've updated the flexcal posts to reflect it. It is a breaking change; instead of $.namespace.widgetname.subclass('namespace.newwidgetname', […]

New jQuery plugins, $.repo and $.getScripts

See the code. jQuery plugin to allow using to get the latest commit of a github repo github won't let you hotlink to their site directly; sends its content with a X-Content-Type-Options:nosniff header, so modern browsers won't accept it as javascript. gets around that by pulling the raw file and re-serving it […]

Improved flexcal

Two new additions to flexcal, which is now at version 2.2. See the code and a demo, that uses my new github pages. Mouse Wheel The calendar now responds to wheel events, changing the month with scroll up/down and changing the calendar tab with scroll left/right. I initially tried to throttle it since my trackpad […]

Updated $.fn.status

I've added the ability to use the console with my status plugin, so you can do $(console).status({ run: $.post(url, {data: data}).then( function() { return 'Data Saved' }, function() { return new Error('Data Not saved') } ) }); And the output will go to the console rather than to an element on the page. For simple […]

Rethinking $.fn.sendkeys

See the demo. See the source code, which depends on bililiteRange. Modern browsers won't let synthetic events (triggered with dispatchEvent) execute their default actions (meaning the action that would occur if the event was triggered by a user action). The Event object has a read-only field called isTrusted that is false for anything but unmodified […]

Rethinking $.keymap

Download the code. See the demo. See the hotkeys demo. Dealing with keydown events is a pain, since the event object has always encoded the key as an arbitrary numeric code, so any program that deals with key-related events has something like: var charcodes = { 32 : ' ', 8 : 'Backspace', 20 : […]

flexcal with European date formatting

The question came up about using "European" dates (day/month/year) rather than "American" dates (month/day/year) in flexcal. The biggest problem is that the built-in Date.parse() (which is used by new Date(string)) uses the American format, at least with my browsers and settings. The code in flexcal that does the formatting are in the following methods: format({Date}) […]

flexcal with “Today” button

Someone asked about adding a "today" button/link to flexcal. It's actually pretty simple: <input id="date1"/> $('#date1').flexcal({'class': 'multicalendar', calendars: ['en','he-jewish']}); var todaylink = $('<a>Today</a>').attr({ 'class': 'commit', rel: $.bililite.flexcal.date2string(new Date), title: $('#date1').flexcal('format', new Date), style: 'text-decoration: underline; cursor: pointer' }); $('#date1').flexcal('box').find('.ui-flexcal').append(todaylink); The key is the todaylink which I append to the calendar (the $('#date1').flexcal('box').find('.ui-flexcal') line). The underlying […]