[jQuery] Re: hiding a div when another div becomes empty?

2008-05-21 Thread thekman
ok, thank you, makes perfect sence now... On May 21, 1:34 pm, Wizzud <[EMAIL PROTECTED]> wrote: > It's just usage. > '$this' is commonly used to indicate that the variable holds the > jQuery object of 'this'. Personally I tend not to use variable names > beginning with '$' because it confuses me,

[jQuery] Re: hiding a div when another div becomes empty?

2008-05-21 Thread Wizzud
It's just usage. '$this' is commonly used to indicate that the variable holds the jQuery object of 'this'. Personally I tend not to use variable names beginning with '$' because it confuses me, but a lot of people do, and that tends to be the convention they use, ie. var $this = $(this); var $elem

[jQuery] Re: hiding a div when another div becomes empty?

2008-05-21 Thread thekman
Hi Wizzud, Just wondering if there is any performance/browser compatibility or any other reason you changed: var $this = $(this).attr("class"); $('#'+$this).show(); to var $this = $(this); $('#'+$this.attr('class')).show(); On May 21, 9:38 am, thekman <[EMAIL PROTECTED]> wrote: > Thank you

[jQuery] Re: hiding a div when another div becomes empty?

2008-05-21 Thread thekman
Thank you Wizzud, works a treat... On May 21, 9:26 am, Wizzud <[EMAIL PROTECTED]> wrote: > $('#hiddenleft a').livequery('click', function() { > var $this = $(this); > $('#'+$this.attr('class')).show(); > $this.remove(); > if(!$('#hiddenleft a').length){ > $('#hiddenleft,#hid

[jQuery] Re: hiding a div when another div becomes empty?

2008-05-21 Thread Wizzud
$('#hiddenleft a').livequery('click', function() { var $this = $(this); $('#'+$this.attr('class')).show(); $this.remove(); if(!$('#hiddenleft a').length){ $('#hiddenleft,#hiddencontent').hide(); } }); On May 20, 3:52 pm, thekman <[EMAIL PROTECTED]> wrote: > Hi all, >