Geez can we revert that? RT @timmillwood: OMG! What’s happened to http://drupal.org! Sorry, I’m no designer, but that doesn’t look too good.
Toggling between event handlers using jQuery’s toggle()
Ever been in a situation where you need to do something on click except if it’s already been done, in which case you undo it? Previously, I would do this by setting a class on the first click and then checking for that class to see if it’s already been clicked.
Turns out, there’s a function that makes it easier. Just sticking this here in hopes that someone else stumbles on it.
RT @drupal: What do a million nodes add up to? A truly amazing and prolific #Drupal community! http://drupal.org/node/1000000
Do any of you use ubuntufunnel.com? I’m thinking about just letting the domain expire in January.
Use jQuery to fade to a different background image on submit button hover
There’s a pretty common and nice looking that lets you fade to a different background image when you hover over a link, div, etc. For an example, see Dragon Interactive’s navigation. That method basically involves adding an empty span tag inside the link or div, and setting it to take up the full available space but be transparent. Then, on hover, you fade it into view (and you can set whatever background image you want on it so it looks nice and pretty).
However, that method doesn’t work on form submit button inputs since you can’t add HTML inside an <input> tag (since they’re self-closing). So you’re stuck trying to figure out another method. Here’s a simple one that worked for me.
Basically, instead of setting a span inside the element, you wrap the element in a div, so you’re basically doing the opposite. Then, you can set whatever background image you want on the div, and write a bit of jQuery that, on hover, fades the button to an opacity of 0.01 (so it’s transparent, showing the div’s background image instead of the button’s, but still clickable).
Here’s some code to illustrate:
The HTML for the submit button
The jQuery which wraps the submit button in a div and does the fading on hover/mouseout
The CSS to replace the button with an image (using a large negative text-indent which is just my preferred method) and to set the background image on the background div
Give me a shout if you try it out and have trouble.
RT @goturnip: Close to rolling out a heavily reworked UI! Screenshots: time page: http://i.imgur.com/CFebV.png tasks page: http://i.imgu …
RT @goturnip: Turnip is officially in free open beta and we’d LOVE for you to give it a shot. Let us know what you think! http://goturni …
Really digging Chive as a nice alt to phpMyAdmin. http://www.chive-project.com/

