[jQuery] Re: Delete first ten children of a prent div

2008-02-17 Thread Michael Ray
So I discovered the nth-child selector, and ere is what i came up with: J('#nextButton').click(function () { J('#calendar div:nth-child(1)').hide(); J('#calendar div:nth-child(2)').hide(); J('#calendar div:nth-child(3)').hide(); J('#calendar div:nth-child(4)').hide(); J('#calendar

[jQuery] Re: Delete first ten children of a prent div

2008-02-17 Thread Cloudream
view .slice function on docs.jquery.com On Feb 18, 2:27 am, Michael Ray [EMAIL PROTECTED] wrote: So I discovered the nth-child selector, and ere is what i came up with: J('#nextButton').click(function () { J('#calendar div:nth-child(1)').hide(); J('#calendar div:nth-child(2)').hide();

[jQuery] Re: Delete first ten children of a prent div

2008-02-17 Thread Equand
try $('#calendar div:lt(10)').hide().remove(); coz hide() doesn't mean to remove(). and you are just repeating the hide action. On Feb 17, 7:27 pm, Michael Ray [EMAIL PROTECTED] wrote: So I discovered the nth-child selector, and ere is what i came up with: J('#nextButton').click(function () {