This is more for your sake than any real concern of mine, but Drupal has include an API for JS Behaviors in Drupal 6. You should check out the info here and peruse the code in core to see how to convert your module's .js file to use this. I did it for Ubercart with a little bit of trial and error. : )
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | block_edit_324516_drupal_behaviors.patch | 746 bytes | matason |
Comments
Comment #1
irakli commentedYeah, that's in the loop, but this way I was able to use the same Javascript file for D5 and D6 :) Was trying to get the module out of the door quicker. Will revise later.
Thanks for the feedback
Comment #2
matason commentedAttached patch replaces
$(document).ready(function() {with
Drupal.behaviors.block_edit = function (context) {Comment #3
psynaptic commentedCommitted to DRUPAL-6--1.
Thanks guys!