H. Something like
$('#header').next(':not(#new)').prev().after('') ?
That way you step forward to the next element, if #new is already
there it will 'zero' the object, but you need some other element as a
following sibling for it to work. But it's clumsier than a condition
and wastes quite a
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('test');
>
> }
>
> or, logically, you wouldn't insert two elements with the same ID, so
> you could simply use
> if (!$('#new').
As I understand you have the problem that some information you send
via AJAX is been sended two, tree, etc. times because the user gets
desperate and can't wait a couple of seconds. If that's you case,
happened to me too. I solved with blockUI. I blocked, pages, or even
part of a page (specificall
And that can be shortened to:
var h = $('#header');
if (!h.next(':not(#new)').length) {
h.after('test');
}
or, logically, you wouldn't insert two elements with the same ID, so
you could simply use
if (!$('#new').length)
On Nov 29, 4:50 pm, seasoup <[EMAIL PROTECTED]> wrote:
> or you can te
or you can test inside the bind function:
if ($('#header').next().('attr','id') != "new") {
$('#header').after('tester');
}
On Nov 29, 7:34 am, Dave Methvin <[EMAIL PROTECTED]> wrote:
> Do you only want the button to work once? If that is the case, use .one
> () instead of .bind().
Do you only want the button to work once? If that is the case, use .one
() instead of .bind().
6 matches
Mail list logo