Unicorns are a mythical creature, and so is that use of parentheses.
Could this be the syntax you were looking for?
(function() {
var $ = window.jQuery;
$("#CollapseExpandTd").click(
function() {
$("#TreeviewTd").toggle();
$("#MenuBarTd").toggle();
});
})();
That puts al
Maybe the asp.Net ajax is still working and changing elements when the DOM
is ready in the page.
I would encourage you to get rid of your asp.net ajax too. It's a nightmare
of issues.
2009/12/23 Šime Vidas
> Well, it actually gets even shorter... you can combine the two
> selectors into one
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 runni
3 matches
Mail list logo