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=newtest/div');
}
or, logically, you wouldn't insert two elements with the same ID, so
you could simply use
if
H. Something like
$('#header').next(':not(#new)').prev().after('div id=test/
div') ?
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 that can be shortened to:
var h = $('#header');
if (!h.next(':not(#new)').length) {
h.after('div id=newtest/div');
}
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:
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
Do you only want the button to work once? If that is the case, use .one
() instead of .bind().
or you can test inside the bind function:
if ($('#header').next().('attr','id') != new) {
$('#header').after('div id=newtester/div');
}
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().
6 matches
Mail list logo