Round-up: IE6 radio bug; updated Dropdown...
First up, thanks to Gerard Okono, who brought to my attention a bug in IE 6 and 7 whereby radio buttons inserted after the DOM has loaded are apparently uncheckable.
Domscripter, my handy DOM-scripting time-saver, has therefore undergone a fudge to get round this problem, involving using a click event to force the clicked radio button to be checked, at the same time unchecking any previously-checked sibling of the same radio family. See the full fudge here.
Secondly, Dropdown has undergone a bit of a revamp. It now accepts more parameters and you have the option of breaking the links in the drop-down into columns - handy for drop-downs with lots of links. Head over here for full info.
Currently Dropdown is a navigation tool designed for aps, but I'm going to tweak it to be usable in forms, too. Stay posted...
post a commentjQuery drop-down selector
UI / UX developers have long wished the built-in was a little more tangible, rather than a bunch of options that have no meaning until you set up some Javascript to detect and act on their selection.
Dropdown is a simulation of the in-built , except with links, not options, and allowing you to specify the behaviour of each link (callback? disabled?) and precisely how the drop-down looks.
Head over here to download, get usage info or view a demo.
You call it by running dropdown(linkData), where 'linkData' is an array containing objects that hold data about each link, like so:
1dropdown([
2 {url: 'http://www.yahoo.co.uk', text: 'Yahoo!'],
3 {text: 'Bing', click: function() {
4 alert("Sorry - we're not going to Bing right now");
5 }},
6 {url: 'http://www.google.co.uk', text: 'Google', disabled: true}
7]);
As with everything I write, it's just one file. No dependent HTML or CSS - everything's DOM-scripted by the scirpt and styled within it, too.
post a comment