Hi,

I'm not an expert in this, I've checked list archive and I didn't find
nothing similar. If You know why this is happening please let me know.

HTML is something like that:

<form name="test" method="get" action="something">
  <input name="handler" id="browser" type="radio" value="browser"
checked="checked" class="defaultHandler"/>
  <input name="handler" id="browser2" type="radio" value="browser2"  /
>
  <input type="submit" name="submit_" value="submit" />
</form>

script adds function to click event of both radios and invokes click()
on first one.

<script type="text/javascript"><!--
$(document).ready(function(){
           $('input[name="handler"]').click(function() {
                alert(this.id);
           });
          $('input[name="handler"]:first').click();
});
// --></script>

In IE 6.0 click() was not invoked. I've changed line with invocation
to get this:
 $('.defaultHandler').click(); didn't helped. But after adding
setTimeout
(setTimeout('$(".defaultHandler").click()',400);) it works like a
charm. Can someone explain me what
is going on? Why do I have use such a tricks? DOM manipulation in IE
can be that slow...

regards, Adam

Reply via email to