User login

JavaScript

Drupal adds class js to html tag when JavaScript is enabled

texas-bronius: What's the best way to provide css for non-js-enabled browsers that differs for css for js-enabled?
17:13 texas-bronius: hi benjamin-agaric welcome back
17:15 benjamin-agaric: texas-bronius: hi. Assign the classes themselves with JavaScript?
17:15 texas-bronius: benjamin-agaric: duh. Yes, good idea thanks. Class name could be "hasjs" or something.

JQuery select elements without a given class or ID

Anywhere you can use .classnamehere as a Jquery selector, you can use:

:not(.classnamehere)

TinyMCE, iFrames, JQuery and Drupal scattered notes

Drag and drop into the TinyMCE textarea triggers onEvent twice in such close succession that it creates a race condition, and the same values for the length of the textarea before and after are given.

Getting around this by putting the character change check new value set before running the code. Maybe a timer check, or ideally a way to check the textarea with just a timer and not use onEvent at all, would be best.

For usability, Drupal should focus on the first relevant form field

For a basic, but nice, usability improvement Drupal, for all pages where a form is the center of attention, the first form field that people should type in should have the keyboard focus given to it.

Here's a method for doing it with JQuery: http://www.gerd-riesselmann.net/development/focus-first-form-field-with-jquery

Timelines in Drupal

Kara:
this is what i'm workign on

http://simile.mit.edu/timeline/docs/create-timelines.html

benjamin melançon
There's a Drupal module for that (and it's sure to be better than poll module, which is getting voted out of core), but it's not up to date: http://drupal.org/project/timeline

Syndicate content