Hide and Slide Drupal content with jQuery

#snippet #Drupal

The Drupal core and many modules use the jQuery package to create nice interactive effects. But it’s also a handy and easy to use tool for designers and authors!

Here is a quick example to show/hide a div with a nice slide effect, triggered from an adjoining element. If you know your CSS you can do all sort of tricks with this.

Option Switch Helper for Rails

#rails #ruby #snippet #development #helper

There are always some options for your page. Perhaps the number of items to display (articles, picture, projects, …). Or the sort key for those. Preferably you set some sane defaults. But you’d like to enable your visitors to change those?