Skip to content

{ Category Archives } Javascript

Inline Audio Player

Download the code. Demo. Download the WP Audio Player Standalone. So the rabbi asked me to add the ability to play the audio on the taamim page (basically, a long list of short MP3's) directly on the page, rather than click the link to open a new page. No problem, right? We're living in an [...]

Nice Javascript library: underscore.js

Modern javascript provides a host of cool functional-programming toys like forEach and reduce, but I'm stuck with IE* at work, which does not. jQuery fills some of those gaps (it has $.each and $.map) but not everything one would want. Enter underscore.js, which bills itself as "the tie to go along with jQuery's tux." It [...]

New jQuery Plugin: showPassword

I put yesterday's unmask password plugin together with the code to automatically create a checkbox to control it, and removed the dependency on jQuery UI. Download the code. Example <input type="password" id="password"/> $('#password').showPassword('Show Characters as I Type'); Use $('[type=password]').showPassword(string) creates a checkbox as above with string as the label. If the checkbox is checked then [...]

Unmask Password Plugin

I hate password masking—hiding what I'm typing to prevent someone from looking over my shoulder at my passwords. I know when I'm in public and when I'm alone in the house, and it should be my choice to actually see what I'm typing, since it has to have some nonsense combination of characters. Even Jakob [...]

HTML5 validator plugin

tl;dr Download the code. Use $.validateHTML5(callback), where callback (result, data) is a function that is called with the result, a string that can be "valid" if the page validated, "invalid" if it did not, "warning" if it validated but is "in some way questionable", or "not validated" if some error occurred. data is the actual [...]

Minor update to flexcal

Updated flexcal to 1.2.1; nothing major, just changed the Hebrew numbers to use the technically correct Unicode code points HEBREW PUNCTUATION GERESH (&#x05F3; ׳) and HEBREW PUNCTUATION GERSHAYIM (&#x05F4; ״) rather than single and double quotes. Also similarly updated the Hebrew keyboard.

flexcal package

There's been some interest in putting flexcal and all its dependencies into a single file (that would be jquery.ui.subclass.js, jquery.textpopup.js, jquery.flexcal.js, and flexcal.html). The problem with putting it all into a ZIP file is keeping it updated; I don't have an automated make-like system and there's no way I'm going to remember to keep the [...]

A flexcal Example

I've had some questions about extending flexcal so I created one that combines filtering, output formatting and drop-down menus. The filtering will only allow dates going back 17 years, and the calendar will start on that date. The formatting will use European dates (d/m/y). The drop-down menus will be the ones from the original post, [...]

Updated flexcal and textpopup, again

In a major burst of middle-of-the-night hacking, I've updated flexcal to better handle changing options after instantiation and added a current option, representing the currently highlighted date. I also updated textpopup with a new option, box that allows you to set the popup's container, useful for inline widgets. The flexcal API examples use it for [...]

The flexcal API and an inline flexcal

My flexcal plugin exposes a few useful methods, which I have not documented elsewhere. They are called, like all jQuery UI widget methods, by creating the widget: cal = $('input.date').flexcal() then invoking the method: cal.flexcal('setDate', '10/25/2011').