JQuery UI (dialog) + events > /dev/null ?

JQuery UI (dialog) + events > /dev/null ?

Hi, all I have been using JQuery so far and seems I found some stranges in the event handling methods
I have been developing the system which requires multi dialog windows and rich user interface, and I am binding some event handlers to an element e.g.
<blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote"> $('#some_div').click(some func() {}) <font size="4"><span style="color: rgb(255, 0, 0);">or</span></font>  $('#some_div').bind('click', some_func)</blockquote>
<div>after if the user opens some dialog other handlers are dispatched
<blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote"> $('#some_div').dialog(some_settings);</blockquote>
<div>here I found that all event handlers do not work (they are just dispatched why?), so I decided to rebind them again e.g. with such function
<blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote">
function resetEventHandlers(elements, events, functions) {
    if (typeof elements != 'object') {
        throw new Error('Type of `element` argument must be an array or an object.');
    }
   
    if (typeof events != 'object') {
        throw new Error('Type of `events` argument must be an array or an object.');
    }
   
    if (typeof functions != 'object') {
        throw new Error('Type of `functions` argument must be an array or an object.');
    }
   
    if (elements.length != events.length || elements.length != functions.length) {
        throw new Error('Mismatch in number of passed arguments.');
    }
    </blockquote><blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote">
<div>// some other tests for a validity....
</div></blockquote><blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote">
    for (var i = 0; i < elements.length; i++) {
        $(elements[i]).unbind(events[i], functions[i]);
        $(elements[i]).bind(events[i], functions[i]);
    }
}
</blockquote></div></div>
Does anybody tackled such problem before?
--
*(^_^)*