On Fri, Mar 7, 2008 at 7:23 PM, Jack Bates <ms419@freezone.co.uk> wrote:
I have one Drupal 6 JavaScript behavior which must be run before another behavior, however the JavaScripts which set `drupal.behaviors.x` are included in the page in the opposite order. Consequently the behaviors are called in the wrong order.
I did a little googling and read the section of drupal.js responsible for calling behaviors, but haven't found any techniques for controlling the order of behaviors. Do any techniques for controlling the order of behaviors currently exist, or are any planned?
There are some "hacks" in Drupal 6 around textarea resizing and teasers to ensure proper ordering, basically calling out to the behavior to run first, if the second one finds out (by looking for a class) that the first did not run yet. Gabor