blockUI 2.31 throws a JavaScript error in FF 3.6.10

blockUI 2.31 throws a JavaScript error in FF 3.6.10

When using blockUI, sometimes I get an error on line 462 of the code, near the end of the handler function:

  1. if ($(e.target).parents('div.' + opts.blockMsgClass).length > 0)

This may or may not be due to firing multiple .block() events on the same element.

The problem seems to be limited to Firefox; IE8 & Chrome 6 work without an error. I have tested this on multiple Firefox installations.

I have a fix that checks to see if opts has been defined as a closure prior to its use:

  1. if (typeof opts !== 'undefined' && $(e.target).parents('div.' + opts.blockMsgClass).length > 0)

If you could include this in your next version, that'd be great!

~ Michael