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. : )

CommentFileSizeAuthor
#2 block_edit_324516_drupal_behaviors.patch746 bytesmatason

Comments

irakli’s picture

Assigned: Unassigned » irakli
Status: Active » Postponed

Yeah, 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

matason’s picture

Status: Postponed » Needs review
StatusFileSize
new746 bytes

Attached patch replaces

$(document).ready(function() {

with

Drupal.behaviors.block_edit = function (context) {

psynaptic’s picture

Status: Needs review » Fixed

Committed to DRUPAL-6--1.

Thanks guys!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.