ui.dialog overlay issue with onclick/onmousedown events

ui.dialog overlay issue with onclick/onmousedown events


Hello all,
I figured I'd write a simpler question than the one I had yesterday
since it was a few questions jammed into one post.
Basically here is some really simple code:
<script>
    function donkey(){
        $("#example").dialog({bgiframe:true, title:"hello there",
modal:true});
        $($("#example").data("dialog").overlay.$el[0]).bind("click",
function(){ alert(0); })
    }
</script>
<div id="example" class="dialog">
    dialog content goes here
</div>
Note the 2nd line which binds a click event to a function. This works
in FF and Safari but not in IE6. However if I change the bind to a
mouseover, then all is well. Binding to mousedown doesn't work
either, so I can't seem to figure out what it is about the click or
mousedown event that doesn't seem to bind properly.
However, if I alert what the object's onclick or onmousedown is, it
tells me it's a function. So it seems like it knows what it is, but
just doesn't execute.
Whether I do a mind or simply do a :
$("#example").data("dialog").overlay.$el[0].onclick = function()
{ alert(0); }
the results are the same. It will work in FF but not IE6.
Thanks,
Shao