views:

29

answers:

1

Hello all,

The following doesn't seem to work in IE6. However, it works with IE7+ and firefox. I think I have had a similar issue before where IE6 doesn't like spaces in JQuery selectors. However, I don't know how to re-write this so IE6 will accept it.

$('#other_stages :checkbox:not(#section_2_active, #co_t)').change();

I have also tried the following and it didn't work either:

$('#other_stages').find('input[type=checkbox]:not(#section_2_active,#co_t)').change();

Thanks all for any help

+1  A: 

It works for me on IE6: http://jsbin.com/ekoli4/2

T.J. Crowder
@TJ - thank you for putting that up! So the space isn't the problem. I guess its the iphone-style checkbox plugin that I am making use of. http://awardwinningfjords.com/2009/06/16/iphone-style-checkboxes.html - this plugin must not be picking up on the change that JQuery bubbles up.
Abs
I'll open a new question for this issue as it has been determined spaces in JQuery selectors is not a problem.
Abs
@Abs: How strange, if it only happens on IE6 and not others. The plugin must be relying on something on the event object that jQuery isn't supplying when doing the synthetic event on IE6. (If it weren't working on IE7 and Firefox, I'd think the plugin wasn't using jQuery to hook things up, since jQuery's `trigger` only triggers handlers jQuery hooked up, but since it is...)
T.J. Crowder
@TJ - as I was writing the new question, I checked the order of initialisation of the plugin and the change trigger. The change trigger was happening before the plugin was initialised. This shouldn't be a problem since the plugin will pickup on the state of the checkbox but not in IE6 for some reason!. However, I have resolved my issue by changing the order of the initialisation of the plugin and change event and things are working well on IE6 for now! :)
Abs