Calendar and date-picker
Just posted a calendar/date-picker plugin I've been working on for some weeks. In short, it aims to be the most versatile and easy-to-integrate plugin of its kind, and it's the one I use on the right of this page.
It's just one file (including all styling - no separate CSS files), and you have full control over:
- what fields should wake up/hide the calendar on focus in/out, or should it always be visible?
- what dates are displayed (particular ones? Future only? Past only)
- what happens when a date is clicked (write the date to a text field? Pass it to a callback function? Assign it to a variable?)
...and much more.
Head over here to download, get usage info or view a demo.
post a commentDomscripter - reduce your DOM-scripting code
Urgh - is it me or does native DOM-scripting require a lot of lines of code? Imagine creating a link and giving it a class and an href; that's one line to create the element, one to give it a text node, two more to apply the href and and class and one more to append it.
Hence I wrote domscripter, a powerful tool for creating HTML elements en-masse. In one function call you stipulate the element you want to create, where it should live in the DOM, what properties it should have, what assistance elements should be created at the same time (e.g. a label for a form field), and more.
Head over here to download, get usage info or view a demo.
1 comments | post newMSThis - simulate W3C events in IE
Just posted a script I wrote which aims to tackle the age-old problem of IE registering events on Window rather than on the event trigger element.
This has long caused Javascript developers headaches since it means that, in event callbacks, the 'this' keyword does not point to the trigger element like it does in the W3C standard.
MSThis rectifies that, simulating W3C event-handling in IE. It works by storing an event handler on an element, then firing them as methods of it. Frameworks like jQuery probably do something similar to harmonise W3C vs. MS event implementations.
Head over here to download, get usage info or view a demo.
post a commentLightbox and lightbox dialog
Just posted this. It's a standard lightbox, which runs on a jQuery selector, but more interestingly it's also a lightbox-assisted simulator for in-built browser dialog methods. You have full control over how your dialogs look and act. Here's a demo for a confirm():
1lbdialog({
2 content: "Go to Google?",
3 OKButton: {
4 text: "Yeah, OK",
5 callback: function() {
6 location.href = "http://www.google.co.uk"
7 }
8 },
9 cancelButton: {
10 text: "No, not now"
11 }
12});
Head over here to download, get usage info or view a demo.
post a comment