On 30 Lis, 18:30, ricardobeat <[EMAIL PROTECTED]> wrote:
> And that can be shortened to:
>
> var h = $('#header');
> if (!h.next(':not(#new)').length) {
>      h.after('<div id="new">test</div>');
>
> }
>
> or, logically, you wouldn't insert two elements with the same ID, so
> you could simply use
> if (!$('#new').length)

Thanks.
I was looking for some short notation,
because now I use conditions like seasoup’s.
I thought that maybe it is possible to do it in the chaining mood.

--
regards,
takeshin

Reply via email to