[jQuery] Re: Ajax callback parameter endless
a call like this : confirm('message ?',function(){showAnswer ('1','2','3');}) the function showAnswer is execute 1 time. If i make another call : confirm('message ?',function(){showAnswer ('1','2','3');}) the function showAnswer is execute 2 times. I don't want (n+1) answer after call confirm. How can i have always one answer ? On Feb 6, 3:36 pm, ilovejquery ilovejqu...@gmail.com wrote: Didn't get exactly what you want, but I think you might find useful the fact that you have arguments array in body of every function() that has an array of arguments. Read jQuery HowTo Resource - http://jquery-howto.blogspot.com On Fri, Feb 6, 2009 at 7:12 PM, Kpitn pierre.bas...@gmail.com wrote: Hi I have override the confirm function like this : function confirm(msg,callback_true,callback_false) { if yes{ callback_true(); } else{ callback_false(); } } In my application i use the function like this : confirm('message',function(){ alert(ok)}, function (){ alert('not ok')}); I must ask the question a lot of time without reload the page. The problem is , when i recall the question, the answer is show 2 times, when i recall another question, the answer is call 3 times, etc ... I think the problem comes, from the way i use the callback, but how can i do if my callbacks functions have parameters ? Thx
[jQuery] Ajax callback parameter endless
Hi I have override the confirm function like this : function confirm(msg,callback_true,callback_false) { if yes{ callback_true(); } else{ callback_false(); } } In my application i use the function like this : confirm('message',function(){ alert(ok)}, function (){ alert('not ok')}); I must ask the question a lot of time without reload the page. The problem is , when i recall the question, the answer is show 2 times, when i recall another question, the answer is call 3 times, etc ... I think the problem comes, from the way i use the callback, but how can i do if my callbacks functions have parameters ? Thx
[jQuery] [plugins] [jcarousel] Add new item
Hi all, I'm trying to add new item on the fly with jcarousel. The function itemLoadCallback, didn't work to add item when you want. The plugin is build like this : $.fn.jcarousel = function(o) { return this.each(function() { new $jc(this, o); }); }; $.jcarousel = function(e, o) { ... } $.jcarousel.fn.extend({ setup: function() { } }); If i want to add an new function, how could i access her ? I want to do something like that : $('ul').jcarousel(); $('ul').jcarousel('add',options);
[jQuery] Mouse Out with two divs
Hi, I have a two div with two id : div id=somediv many Contenet /div div id=result/div i want to make something like that : $(#somediv).bind(mouseleave,function(){ $('#result').fadeOut(); }); $(#result).bind(mouseleave,function(){ $('#result').fadeOut(); }); But i don't want that result dissapears if if move my mouse on the other div. Is there a way to say : hide a div, when mouseout two divs, but not if you are hover one or another ? The div are not in the same area in the page. But They are touching in render page.
[jQuery] the Return of Validation Plugin - hows to only fire on form submit?
Hi, I find an old post : http://groups.google.com/group/jquery-en/browse_thread/thread/cf34a35e202d9707/4fb5e88f4c81127a?lnk=gstq=fire+submit# which use this method to show error only on sbumit : var validator = $(form).validate( { onblur: function(){}, onkeyup: function(el) { if(validator.check(el)) $ (el).removeClass(validator.settings.errorClass); else $(el).addClass(validator.settings.errorClass); }, showErrors: function(errors) { alert(should only fire on submit); } }); Is there a way to do this in validate plugin 1.2.1 ?