Drupal.behaviors handles auto attaching 'on document ready' and when new elements are dynamically added to the page.
hide_this_block.js really only needs to register a function with Drupal.behaviors.

Comments

recrit’s picture

Status: Active » Needs review
StatusFileSize
new1.47 KB

attached patch alters the js code to register the click event with Drupal.behaviors.

torgospizza’s picture

Status: Needs review » Reviewed & tested by the community

Worked like a charm for me. Attaching with a behavior also allowed me to override the default functionality, since I'm putting the block into an "announcement" container div, I needed to be able to slideUp() that parent div as well.

Thanks!

pbull’s picture

Assigned: Unassigned » pbull
Status: Reviewed & tested by the community » Fixed

Finding time to breathe some life back into this module, which I've sadly neglected. Committed to 6.x-1.x branch.

Status: Fixed » Closed (fixed)

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