Nah, make it sexier, use parenteses (tip from the new John Resig's ebook):
( var $ = window.jQuery;
$("#CollapseExpandTd").click(
function() {
$("#TreeviewTd").toggle();
$("#MenuBarTd").toggle();
});
);
$ will be a local variable and unicorns will come to see the magic running
around.
2009/12/23 jqHunter <[email protected]>
> Thanks much Sime Vidas, it worked! Since mine is an aspx with an AJAX
> UpdatePanel, jQuery(document).ready(function(){...}); did not work for
> me. So I implented it in the pageLoad as below:
>
> jQuery.noConflict();
> function pageLoad() {
> jQuery("#CollapseExpandTd").click(function() {
> jQuery("#TreeviewTd").toggle();
> jQuery("#MenuBarTd").toggle();
> });
> }
>
> Thanks again!
>
--
At,
Leo Balter
http://leobalter.net
Blog técnico: http://blog.leobalter.net