[jQuery] Re: $.Event is not a function js/jquery/ui.core.js Line 345

2009-10-26 Thread Maxime FAYE
Not this neither : jQuery UI 1.7.2 says ui.core.js 2009/10/23 Maxime FAYE > OK i'll check this and i'll keep you posted :) > > 2009/10/23 Richard D. Worth > > How bout an old version of jQuery UI then? If you're using jQuery v1.3.2 >> make sure you're not using a jQuery UI version older than 1.

[jQuery] Re: $.Event is not a function js/jquery/ui.core.js Line 345

2009-10-23 Thread Maxime FAYE
OK i'll check this and i'll keep you posted :) 2009/10/23 Richard D. Worth > How bout an old version of jQuery UI then? If you're using jQuery v1.3.2 > make sure you're not using a jQuery UI version older than 1.7 > > - Richard > > > On Thu, Oct 22, 2009 at 11:20 AM, Maxime FAYE wrote: > >> Nope

[jQuery] Re: $.Event is not a function js/jquery/ui.core.js Line 345

2009-10-23 Thread Richard D. Worth
How bout an old version of jQuery UI then? If you're using jQuery v1.3.2 make sure you're not using a jQuery UI version older than 1.7 - Richard On Thu, Oct 22, 2009 at 11:20 AM, Maxime FAYE wrote: > Nope : > > jQuery JavaScript Library v1.3.2 that's what the jQuery.js file says :) > > > 2009/1

[jQuery] Re: $.Event is not a function js/jquery/ui.core.js Line 345

2009-10-22 Thread Maxime FAYE
Nope : jQuery JavaScript Library v1.3.2 that's what the jQuery.js file says :) 2009/10/22 Ariel Flesler > Could be that you're using an old version of jQuery (prior to 1.3.x?) > > > On Thu, Oct 22, 2009 at 1:03 PM, Maxime FAYE wrote: > >> Sorry no... >> >> But i can give you the code that is ge

[jQuery] Re: $.Event is not a function js/jquery/ui.core.js Line 345

2009-10-22 Thread Ariel Flesler
Could be that you're using an old version of jQuery (prior to 1.3.x?) On Thu, Oct 22, 2009 at 1:03 PM, Maxime FAYE wrote: > Sorry no... > > But i can give you the code that is generting the error : > var sDialogId = "divPleaseActionDialog"; > var sDialog = ""; > var oButtons = {}; >

[jQuery] Re: $.Event is not a function js/jquery/ui.core.js Line 345

2009-10-22 Thread Maxime FAYE
Sorry no... But i can give you the code that is generting the error : var sDialogId = "divPleaseActionDialog"; var sDialog = ""; var oButtons = {}; oButtons[aTranslations["ok"]] = function(){ $j('#' + sDialogId).dialog('destroy'); }; sDialog += '' + "\n"; sDialog +=

[jQuery] Re: $.Event is not a function js/jquery/ui.core.js Line 345

2009-10-22 Thread Ariel Flesler
Can you provide a link to the page where you see this error? -- Ariel Flesler http://flesler.blogspot.com On Oct 22, 1:32 pm, Maskime wrote: > Hi all, > > I'm having the following error when  opening a dialog > > $.Event is not a function js/jquery/ui.core.js Line 345 > > I don't really underst

[jQuery] Re: event coordination problem

2009-09-14 Thread Mr Speaker
utton. > > Am I misunderstanding? > > Rick > > -Original Message- > From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On > > Behalf Of Mr Speaker > Sent: Sunday, September 13, 2009 10:07 PM > To: jQuery (English) > Subject: [jQuery] Re: event coordinati

[jQuery] Re: event coordination problem

2009-09-13 Thread Rick Faircloth
om] On Behalf Of Mr Speaker Sent: Sunday, September 13, 2009 10:07 PM To: jQuery (English) Subject: [jQuery] Re: event coordination problem I pasted your code into a new HTML doc and it ran as expected: if you put the focus in the textbox (#id1) then click the button (#id2) both events get fired (

[jQuery] Re: event coordination problem

2009-09-13 Thread Mr Speaker
I pasted your code into a new HTML doc and it ran as expected: if you put the focus in the textbox (#id1) then click the button (#id2) both events get fired (blur event fires first, click event fires second). Is there anything else in your page? Are you getting any JS errors? On Sep 13, 4:27 am,

[jQuery] Re: event coordination problem

2009-09-12 Thread jhm
Not sure how this helps, and in fact I'm pretty much already doing that. The problem is that if the focus is in the field, when the button is clicked I get the blur event only and not the click event on the button. If you try the code in the OP, you'll see this happening. Remember to click into t

[jQuery] Re: event coordination problem

2009-09-12 Thread Rick Faircloth
How about setting the field to "invalid" to start with and force the user to blur the field for a validation routine to declare it valid. Rick -Original Message- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of jhm Sent: Saturday, September 12, 2009 1:04

[jQuery] Re: event-binding to dynamically created elements... (JSP vs JS problem......)

2009-08-30 Thread Josh Powell
sorry .up() is prototype... should be .parent() instead. On Aug 30, 1:20 pm, Josh Powell wrote: > kali - here is a way to accomplish the same thing in less code, and > lets you call the images anything you want instead of having to use > numbers.  This is untested so there may be some slight

[jQuery] Re: event-binding to dynamically created elements... (JSP vs JS problem......)

2009-08-30 Thread Josh Powell
kali - here is a way to accomplish the same thing in less code, and lets you call the images anything you want instead of having to use numbers. This is untested so there may be some slight errors, but the logic should be sound: $(function() { var imageArray = ['foo', 'bar', 'baz'];

[jQuery] Re: event-binding to dynamically created elements... (JSP vs JS problem......)

2009-08-30 Thread Josh Powell
Even simpler: $('img.thumb').click(function () { $(this).toggleClass('dim'); });

[jQuery] Re: event-binding to dynamically created elements... (JSP vs JS problem......)

2009-08-30 Thread kali
actually got solution in another forum (http://www.manning-sandbox.com/ thread.jspa?threadID=34108&tstart=0) works like a charm!! :) namely: $('#image' + i).bind('mouseover', i, function(event) { $('#image' + event.data).addClass('dim'); }); as to other problem (var elem1 =

[jQuery] Re: event-binding to dynamically created elements... (JSP vs JS problem......)

2009-08-30 Thread Kevin Dalman
Good points by Josh. However this selector example... $('img[class="thumb"]).mouseover ...can be written simpler as $("img.thumb").mouseover It's faster in most browsers to select-by-class than to iterate elements and 'read attributes'. jQuery may process both syntaxes the same (?), but us

[jQuery] Re: event-binding to dynamically created elements... (JSP vs JS problem......)

2009-08-30 Thread Josh Powell
for (i = 1; i < 5; i++) { $('#thumb' + i).bind('mouseover',function(event) { $(this).addClass('dim'); }); } The 'i' you've called here is a global variable, in a for loop always put a var in front of it to have local scope (to the function, not block) for (var i = 1; i < 5;

[jQuery] Re: event-binding to dynamically created elements... (JSP vs JS problem......)

2009-08-30 Thread Michael Geary
Something I forgot to mention in my previous reply... To make sure it's clear what code is actually being run in the browser, never rely on looking at your JSP source to understand it. That's what threw you off here. The browser never sees your JSP source, only the HTML/JS/CSS/whatever files that

[jQuery] Re: event-binding to dynamically created elements... (JSP vs JS problem......)

2009-08-29 Thread Michael Geary
You can't call jQuery from JSP code, only from JavaScript. Your JSP code *generates* JavaScript code, which is what actually calls jQuery. In your JSP code, the loop is run in JSP, and it generates a separate block of JavaScript code each time through the loop. Here is the actual JavaScript code

[jQuery] Re: event-binding to dynamically created elements... (JSP vs JS problem......)

2009-08-29 Thread kali
yes I know they are two different things, I do know both JSP and JavaScript, so I do know the difference; I would like to know why what works in JSP doesn't work in JavaScript.. again: this works in JSP: <% for (int i = 1; i < 5; i++) { %> $('#image<%=i%>').bind('mouseover',function(event) {

[jQuery] Re: event-binding to dynamically created elements... (JSP vs JS problem......)

2009-08-28 Thread James
I have difficulties understanding what you're trying to achieve. As someone mentioned, Java is to Javascript as Ham is to Hamster. They're two different beasts. For the 'elem+1' situation, you can do: this['elem'+1] = '...'; to dynamically create variables. But usually you don't have to resor

[jQuery] Re: Event Not Triggering On External JS Files

2009-08-26 Thread Meroe
Sent: Wednesday, August 26, 2009 12:00 AM To: jQuery (English) Subject: [jQuery] Re: Event Not Triggering On External JS Files @Meroe: That was kind of pseudo-code so I checked anyway and there's no spaces in the actual code. @James: No, it doesn't work if I put the jQuery script tag i

[jQuery] Re: Event Not Triggering On External JS Files

2009-08-25 Thread Greg
@Meroe: That was kind of pseudo-code so I checked anyway and there's no spaces in the actual code. @James: No, it doesn't work if I put the jQuery script tag in the head. I was wondering if it had something to do with preventing XSS? There is an ajax call to the button.js's domain (which coul

[jQuery] Re: Event Not Triggering On External JS Files

2009-08-25 Thread James
Does it work if you put your jquery library at the top? (In the ) On Aug 25, 12:31 pm, Greg wrote: > I built a small JavaScript file that does some HTML and CSS > manipulation when you hover over any tag with a certain class.  It > works great when running on the same server, but if I try to use

[jQuery] Re: Event Not Triggering On External JS Files

2009-08-25 Thread Meroe
http://mydomain.com/js/ button.js"> Check your source, but I see an extra space after / and before button.js -Original Message- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of Greg Sent: Tuesday, August 25, 2009 6:31 PM To: jQuery (English) Subject:

[jQuery] Re: event handlers that run after the browser's default action

2009-08-21 Thread Tom Worster
i was interested in using the value of a text input immediately after the browser has finished handling a keyboard event. On 8/21/09 10:14 AM, "ak732" wrote: > > Not sure that there's a more deterministic approach - if so, it's > beyond my limited Javascript knowledge. > > Specifically what

[jQuery] Re: event handlers that run after the browser's default action

2009-08-21 Thread Nick Fitzsimons
2009/8/20 Tom Worster : > > is there a way to set up a page so that a event handler function is bound to > a DOM object and event but it runs _after_ the browser's default action is > complete? > No; the DOM Events specifications explicitly state that the event handling process occurs before the

[jQuery] Re: event handlers that run after the browser's default action

2009-08-21 Thread ak732
Not sure that there's a more deterministic approach - if so, it's beyond my limited Javascript knowledge. Specifically what are you trying to accomplish by wiring an event handler to fire after the default action? On Aug 20, 10:39 pm, Tom Worster wrote: > thanks. > > i thought of using a timeou

[jQuery] Re: event handlers that run after the browser's default action

2009-08-20 Thread Tom Worster
thanks. i thought of using a timeout and it could probably be made to work fairly well. but i'd be left with the worry that some user's crummy old browser and computer that's too busy doing other things might need a longer delay than i set. we can insert event handlers at the beginning of the ev

[jQuery] Re: event handlers that run after the browser's default action

2009-08-20 Thread ak732
This is crude, but might work for you... $("#someId").click()(function() { set_timeout(function() { // stuff to be done 2ms from now }, 2); }); You might have to play with the set_timeout delay a bit, 2ms might be too short. On Aug 20, 3:47 pm, Tom Worster wrote: > is there a way to se

[jQuery] Re: Event click not fired by code added after the page is loaded

2009-08-17 Thread fay.p...@googlemail.com
Oh, yeah! Thank you very much, Carlos. I am new to javascript and jquery and this post saved my day, really :) So ,I hope that Felix can also fix his problem with your post. Greetings from Germany

[jQuery] Re: Event click not fired by code added after the page is loaded

2009-08-14 Thread Carlos Becar
if you load content with ajax you should send code funcionality later load the content, example. $("#container").load('url',{},function(){ /*here you put codes for fires clicks or something*/ $(".addanswer").click(function() /* code here */ }); }); or use plugin like live or listen

[jQuery] Re: Event click not fired by code added after the page is loaded

2009-08-14 Thread Felix
Ok, I answer myself as I founded the answer, in case it can help someone: instead of $(".addanswer").click(function(event){});, put: $(".addanswer").live("click", function(){...}); On 14 août, 10:46, Felix wrote: > Hello, > > I have a page with a form, that represent questions and the > corresp

[jQuery] Re: Event for when a is changed?

2009-07-01 Thread Hector Virgen
You might want to pull the variable declaration out of the anonymous function so that it can be used later (outside the function): var str = ""; $("#theSelectsID").change(function () { str = $(this).val(); }); // later alert(str); -- Hector On Wed, Jul 1, 2009 at 11:25 AM, James wrote: >

[jQuery] Re: Event for when a is changed?

2009-07-01 Thread James
Just simplify it like: $("#theSelectsID").change(function () { var str = $(this).val(); //or -- var str = this.value; }); On Jun 30, 11:51 pm, "developm...@sdinternet.co.uk" wrote: > If you have a single dropdown list with the id of 'theSelectsID' the > below code should store the selected item

[jQuery] Re: Event for when a is changed?

2009-07-01 Thread developm...@sdinternet.co.uk
If you have a single dropdown list with the id of 'theSelectsID' the below code should store the selected item into the variable 'str'. Hope that helps $("#theSelectsID").change(function () { var str = ""; str = $("#theSelectsID").val(); });

[jQuery] Re: Event for when a is changed?

2009-06-30 Thread sso
you might be able to use $('select').change(function(){ // do stuff }); On Jun 30, 7:22 pm, theozmanbo wrote: > How can I trigger a jquery event for when a user changes the option that is > selected in a select statement? I need to update a variable with the new > selected item when this happens

[jQuery] Re: Event Load() ??

2009-06-13 Thread brian
It couldn't possibly work because the javascript isn't there. Add the code to cadastroCliente.php. On Fri, Jun 12, 2009 at 10:24 PM, Frank wrote: > > > Hello, > > I'm with a doubt in jquery, I am using the function load () to call > another page, but after I loaded this page, I can not use the id

[jQuery] Re: Event Listeners

2009-06-10 Thread waseem sabjee
heres aplugin called JQuery logging http://ajaxian.com/archives/jquery-logging here is a link to JQuery console http://code.google.com/p/jquery-console/ try this. add a hyperlink with the class mylink give it a click event like so $("a.mylink").click(function() { alert("random"); }); now rem

[jQuery] Re: event

2009-06-06 Thread Chris Chen
current domElement 2009/6/6 runrunforest > >if(o.btnGo) >$.each(o.btnGo, function(i, val) { >$(val).click(function() { >return go(o.circular ? o.visible+i : i); >}); >}); > > > Hi, > > I wonder whats the second p

[jQuery] Re: Event behaving

2009-05-27 Thread Andy Matthews
Most likely because the button element doesn't recognize the keypress event. Not every element have the same events. Swap out button for input and try it again, it should work just fine. -Original Message- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of

[jQuery] Re: Event is not triggered when the removed from one table to another table

2009-05-18 Thread Karl Swedberg
On May 18, 2009, at 2:30 PM, Josh Nathanson wrote: Events are not automatically bound to new elements added to the dom. However if you are using jquery 1.3+ you can do this to achieve dynamic binding: $("tr").live("dblclick",function(event) { // etc. True, but the OP was referring to row

[jQuery] Re: Event is not triggered when the removed from one table to another table

2009-05-18 Thread Josh Nathanson
Events are not automatically bound to new elements added to the dom. However if you are using jquery 1.3+ you can do this to achieve dynamic binding: $("tr").live("dblclick",function(event) { // etc. -- Josh -Original Message- From: jquery-en@googlegroups.com [mailto:jquery...@googlegro

[jQuery] Re: Event is not triggered when the removed from one table to another table

2009-05-18 Thread Karl Swedberg
On May 18, 2009, at 2:04 PM, naresh wrote: Hi I have a query(JQuery) here. can you plz help me in fixing the issue with this code. That is when I click on of first table that should get removed from first table and added to second table. It is happening fine and good. But when I double clic

[jQuery] Re: Event is not triggered when the removed from one table to another table

2009-05-18 Thread James
Any future elements added to the DOM will not automatically inherit events that are set on the page. Try using the live() function to set your dblclick: $("tr").live("dblclick", function(event) {...}); More info on it here: http://docs.jquery.com/Events/live#typefn On May 18, 8:04 am, naresh w

[jQuery] Re: Event Cleanup Slowness in Firefox

2009-03-26 Thread J K
Thank you - a switch to live solved the problem quite easily. I'm still wondering about the slowness. On Mar 26, 2:37 pm, Karl Swedberg wrote: > don't know why it's so much slower in Firefox, but if you're dealing   > with that many elements, you ought to consider using event delegation   > ins

[jQuery] Re: Event Cleanup Slowness in Firefox

2009-03-26 Thread Karl Swedberg
don't know why it's so much slower in Firefox, but if you're dealing with that many elements, you ought to consider using event delegation instead. You can use the .live() method ... $('td').live('click', function() { // do stuff }); ... or roll your own http://learningjquery.com/2008/0

[jQuery] Re: Event binding newly added jQuery objects

2009-03-07 Thread brian
http://docs.jquery.com/Frequently_Asked_Questions#Why_do_my_events_stop_working_after_an_AJAX_request.3F On Sat, Mar 7, 2009 at 7:21 PM, method8 wrote: > > Each time I add new HTML to a div, either by .html('') or by .load... > it looks great but it seems that the newly added html's event do not

[jQuery] Re: Event handling/propagation question

2009-02-20 Thread Liam Potter
I only used parents() and selected the P as that is what I understood spaceage wanted. spaceage wrote: Actually, this works nicely (I think because of the use of this vs. event.target?): $('div.clickable_element').click(function() { $(this).toggleClass ("selected"); }); On Feb 20, 8:28 am,

[jQuery] Re: Event handling/propagation question

2009-02-20 Thread spaceage
Actually, this works nicely (I think because of the use of this vs. event.target?): $('div.clickable_element').click(function() { $(this).toggleClass ("selected"); }); On Feb 20, 8:28 am, Frederik Ring wrote: > I think it should be also working just this way: > > $('#mydiv').css('cursor','poin

[jQuery] Re: Event handling/propagation question

2009-02-20 Thread Frederik Ring
I think it should be also working just this way: $('#mydiv').css('cursor','pointer').click(function(){ $(this).addClass('selected'); }); No need to select all the contents "manually". On Feb 20, 5:16 pm, spaceage wrote: > OK, so you have to independently assign a handler to all descendant > el

[jQuery] Re: Event handling/propagation question

2009-02-20 Thread spaceage
OK, so you have to independently assign a handler to all descendant elements in the ? Is there no better way via the parent div? On Feb 20, 8:07 am, Liam Potter wrote: > $(document).ready(function () { >     $("div.clickable_element p").click( function () { >        $(this).parents("div.clickab

[jQuery] Re: Event handling/propagation question

2009-02-20 Thread Liam Potter
$(document).ready(function () { $("div.clickable_element p").click( function () { $(this).parents("div.clickable_element").toggleClass("selected"); }); }); spaceage wrote: A question re: event handling/propagation: I have a surrounding and I want any click within the (including a

[jQuery] Re: Event delegation and hover(over, out)

2009-01-28 Thread ShaneRileyDotInfo
Could you check out this example I created and let me know if that was your intended effect? I'm still not entirely certain I'm grasping everything you're trying to do. Basically, you have an initial list. You want the image in each one to fade in/out when the link is hovered. You then want to be

[jQuery] Re: Event delegation and hover(over, out)

2009-01-27 Thread Steffen Wenzel
Hi Shane, thanks for the reply! What you recommend seems to be rebinding the functionality to the latest appended list-item. Which of course would work just fine, but the question is, how can I do this with event delegation (which watches for new elements within the ul)? And it's also the hover

[jQuery] Re: Event delegation and hover(over, out)

2009-01-27 Thread ShaneRileyDotInfo
The way the post initially reads, it seems that when you're appending the ul with an li, the anchor within it does not have the click function bound to it. Is that correct? If so, when you add the li you would need to bind the click function to the newly created anchor. Something like this should

[jQuery] Re: Event code in different .js files

2009-01-19 Thread MorningZ
indeed it is On Jan 19, 3:53 am, Krommenaas wrote: > is this also true of document.ready? > > On Jan 14, 9:24 pm, Ricardo Tomasi wrote: > > > In the old-fashioned you couldn't have more than one event handler: > > > window.onload = function(){ .. } > > > but using jQuery's bind('load', function

[jQuery] Re: Event code in different .js files

2009-01-19 Thread Krommenaas
is this also true of document.ready? On Jan 14, 9:24 pm, Ricardo Tomasi wrote: > In the old-fashioned you couldn't have more than one event handler: > > window.onload = function(){ .. } > > but using jQuery's bind('load', function(){}) you're using the new > standards-based event system, via ad

[jQuery] Re: Event delegation in CLosest()

2009-01-14 Thread sad1sm0
Closest is not part of delegation. Closest is a way to traverse the dom tree to find an elements parent that matches the selector used. I think the reason this is helpful in event delegation is because some browsers may not register the click if it occurs inside of a child element of the li. Fo

[jQuery] Re: Event code in different .js files

2009-01-14 Thread Ricardo Tomasi
In the old-fashioned you couldn't have more than one event handler: window.onload = function(){ .. } but using jQuery's bind('load', function(){}) you're using the new standards-based event system, via addEventListener (attachEvent on IE), in which 'onload' is not a property of the window object

[jQuery] Re: Event code in different .js files

2009-01-14 Thread Krommenaas
strange, but I should have checked. thanks!

[jQuery] Re: Event code in different .js files

2009-01-13 Thread MorningZ
"However, I assume if I do this in two different .js files, the second one will replace the first one" and your assumption is not correct < javascript1.js -> $(window).load(function() { alert("Alert in One"); }); <--> < javascript2.js -> $(wi

[jQuery] Re: event name

2009-01-07 Thread Richard D. Worth
alert(event.type) See http://docs.jquery.com/Events_(Guide)#event.type for more info. - Richard On Wed, Jan 7, 2009 at 5:46 PM, bob wrote: > >var handler = function(e){ > >//How do I know what event triggered this function? >//this does not work: >

[jQuery] Re: event binding issue

2009-01-03 Thread Alexandre Plennevaux
Hi Michael , sorry it's my fault i made a stupid mistake somewhere else ( i dare not tell you what it was, I think i'd better get some sleep :) ). The code as such worked, so i would assume the wrap() does not unbind the events. Thanks again! alexandre On Sat, Jan 3, 2009 at 11:50 PM, Michael

[jQuery] Re: event binding issue

2009-01-03 Thread Michael Geary
Without testing it, off the top of my head I think it may be the .wrap() that is doing you in. That has to remove the element from the DOM and re-insert it, and I think that loses the event binding. Also, I take it that $dsanchors refers to a UL, is that right? Then you're temporarily inserting t

[jQuery] Re: Event callback question

2009-01-02 Thread Cam Spiers
Interesting I have figured out the reason why your example didn't work(and now does). It doesn't work when you have elements in the array which don't need animation/are in the same state initially as the final animation state. So I now have an active class indicating it's state and the selector I

[jQuery] Re: Event callback question

2009-01-02 Thread Ricardo Tomasi
Strange. In my tests the last element's callback was always called last. jQuery's animations are time-based, that means both animations should end at the same time, with a small offset for the last element at most. Anyway, you already have a solution. I had first rewritten yours before trying the

[jQuery] Re: Event callback question

2009-01-02 Thread Cam Spiers
Thats cool thanks Brian and Ricardo for your time. Ricardo that did look really good but it doesn't work for me. jQuery("div.mainLiner div.panel").not(':last') .slideUp(750, function(){ console.log("not last"); }).end() .filter(':last') .slideUp(750, function(){ console.log("last"); //callback }

[jQuery] Re: Event callback question

2009-01-01 Thread Ricardo Tomasi
You're right, that will run the callback once for each element. This is a bit hacky but is the shortest way I could think of: function closeMainPanels(){ jQuery("div.mainLiner div.panel").not(':last').slideUp(750).end() .filter(':last').slideUp(750, function(){ //callback

[jQuery] Re: Event callback question

2009-01-01 Thread Cam Spiers
They are all sliding up at the same time, but I was under the impression that your code would call the callback function once for each div.panel that was found. Am I mistaken? (would be really awesome if it does only call once) And if I'm not, I reiterate that I only want the callback function cal

[jQuery] Re: Event callback question

2009-01-01 Thread Ricardo Tomasi
If they are all sliding up at the same time, isn't it simpler to use function closeMainPanels(){ jQuery("div.mainLiner div.panel").slideUp(750, function(){ / *...callback...*/ }); } On Jan 1, 5:53 pm, "Cam Spiers" wrote: > function closeMainPanels(callback){ >     var panels = jQuery('div.m

[jQuery] Re: Event callback question

2009-01-01 Thread Cam Spiers
function closeMainPanels(callback){ var panels = jQuery('div.mainLiner div.panel'); var done = []; var length = panels.length; panels.each(function(){ var panel = jQuery(this); panel.slideUp(750, function(){ if (done.push(panel) == length){

[jQuery] Re: Event callback question

2008-12-31 Thread Cam Spiers
Thanks for your response. Yes I have used that before, but I need to know how to add a callback function which is called after a set of animations are completed. If I have an array of dom elements which all need the same animation applied to them, how can I tell when all the animations are comple

[jQuery] Re: Event callback question

2008-12-31 Thread brian
On Wed, Dec 31, 2008 at 11:26 PM, Cam Spiers wrote: > Hey, > > function closeMainPanels(){ > jQuery("div.mainLiner div.panel").each(function(){ > jQuery(this).slideUp(750); > }); > } > > How can I tell when all panels have finished animation? > > As I need to call another function

[jQuery] Re: Event registered for a class does not work with all members of class

2008-12-29 Thread Kean
Yea, use clone(true) to copy the events. If you are using jQuery 1.3 beta you can try to use $(selector).live('event', function(){ }); live is like bind just that new nodes added to DOM will inherit the event. Well, this is a trick call event delegation. On Dec 29, 2:40 pm, Ricardo Tomasi

[jQuery] Re: Event registered for a class does not work with all members of class

2008-12-29 Thread Ricardo Tomasi
Didn't look at the source, but have you tried $(element).clone(true) ? That sets 'deep copying' and should copy all the event handlers with it. On Dec 29, 11:33 am, "nikla...@googlemail.com" wrote: > Hello, > > I don't know wether it is the right place for this question but I am > going to ask i

[jQuery] Re: Event listener optimisation advice

2008-12-18 Thread Ricardo Tomasi
Yes, there is. There is a technique called event delegation which consists of exactly that. the Delegate plugin does it: http://www.danwebb.net/2008/2/8/event-delegation-made-easy-in-jquery as does LiveQuery in its own way: http://brandonaaron.net/docs/livequery/ google 'event delegation' and y

[jQuery] Re: event fires exponentially

2008-12-16 Thread Jan Limpens
Yes I do. It's just a bunch of check boxes to filter and order a result. It is not updating the form, too. Nothing disastrous about this. Keep cool, Jan On Tue, Dec 16, 2008 at 5:42 PM, MorningZ wrote: > > This original code you posted > > > $(document).ready(function(){ >$form = $('#fi

[jQuery] Re: event fires exponentially

2008-12-16 Thread MorningZ
This original code you posted $(document).ready(function(){ $form = $('#filter-form'); $form.ajaxForm({ //dataType: 'json', success: function(){ alert("peng"); }, target: "#layout-child-output

[jQuery] Re: event fires exponentially

2008-12-16 Thread Cam Spiers
I think that ajaxForm already adds a submit handler to the form you are adding it to... So i think this is doubling up. $('input', $form).change(function(){ $form.submit(); }); On Wed, Dec 17, 2008 at 6:33 AM, Jan Limpens wrote: > > And this does work: > > $(documen

[jQuery] Re: event fires exponentially

2008-12-16 Thread Jan Limpens
And this does work: $(document).ready(function(){ $form = $('#filter-form'); $('input', $form).change(function(){ $form.ajaxSubmit({ dataType: 'json', success: function(){}, target: "#layout-ch

[jQuery] Re: event fires exponentially

2008-12-16 Thread Jan Limpens
Must be some bug in ajaxForm, I guess. if I change $('input', $form).change(function(){ $form.submit(); }); to $('input', $form).change(function(){ alert('peng'); }); it fires once only, otherwise I get the exponential behavior. My guess

[jQuery] Re: event fires exponentially

2008-12-16 Thread Jan Limpens
No, unfortunately... but I may be able to put something up... On Tue, Dec 16, 2008 at 3:05 PM, Eric Hobo Garside wrote: > > Do you have a live environment where this is hosted, or at least the > code for the page to test it locally? Looks like it should be working > fine, at face value. > > On D

[jQuery] Re: event fires exponentially

2008-12-16 Thread Eric "Hobo" Garside
Do you have a live environment where this is hosted, or at least the code for the page to test it locally? Looks like it should be working fine, at face value. On Dec 16, 11:55 am, "Jan Limpens" wrote: > Hi guys, > > I have this piece of innocent looking code: > > > $(document).ready(function()

[jQuery] Re: event target bug or jquery.validation bug in IE?

2008-12-08 Thread Jörn Zaefferer
I don't quite follow your description, but in any case, you can disable the focusing by setting focusInvalid: false. Jörn On Mon, Dec 8, 2008 at 11:56 AM, Arthur Ccube <[EMAIL PROTECTED]> wrote: > > I'm using jquery.validation.js plugin. It works fine in firefox. > > However, in IE, I have proble

[jQuery] Re: Event handling, bubbling, and SELECT change

2008-12-01 Thread chickenofeathers
Yep, that was me just staring for too long at one chunk of code. Thanks to the kind users who pointed out my very silly extraneous .change() at the end. I hope this saves someone else from a similarly overlooking something so relatively obvious. -c On Dec 1, 2:46 pm, chickenofeathers <[EMAIL

[jQuery] Re: Event trigger ajax event

2008-12-01 Thread Nic Hubbard
Mike, any help on this? On Nov 4, 4:02 am, Mike Alsup <[EMAIL PROTECTED]> wrote: > > I am confused when it comes to triggering an ajax event.  I would like > > to trigger a ajaxStart event, so I use: > > > $.event.trigger("ajaxStart"); > > > But now, what will that trigger?  What piece of code?  

[jQuery] Re: event delegation - great, but how does one trigger the handlers through code?

2008-11-23 Thread Leeoniya
Look for a handler of the supplied type. > > > >          var handler = ; > > > > >          if (handler) > > > >          { > > > >             handler.apply(parent,[evt]); > > > >             break; > > > >          } >

[jQuery] Re: event delegation - great, but how does one trigger the handlers through code?

2008-11-23 Thread ricardobeat
t;          // Look for a handler of the supplied type. > > >          var handler = ; > > > >          if (handler) > > >          { > > >             handler.apply(parent,[evt]); > > >             break; > > >          } > > >  

[jQuery] Re: event delegation - great, but how does one trigger the handlers through code?

2008-11-23 Thread Leeoniya
...; > > >          if (handler) > >          { > >             handler.apply(parent,[evt]); > >             break; > >          } > >          else > >             el = el.parentNode; > >       } > > >    }); > > > }; > > -Original

[jQuery] Re: event delegation - great, but how does one trigger the handlers through code?

2008-11-23 Thread Ariel Flesler
      } > >    }); > > }; > -Original Message- > From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On > > Behalf Of ricardobeat > Sent: Saturday, November 22, 2008 4:44 PM > To: jQuery (English) > Subject: [jQuery] Re: event delegation - great, but ho

[jQuery] Re: event delegation - great, but how does one trigger the handlers through code?

2008-11-22 Thread Jeffrey Kretz
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of ricardobeat Sent: Saturday, November 22, 2008 4:44 PM To: jQuery (English) Subject: [jQuery] Re: event delegation - great, but how does one trigger the handlers through code? You're right, it doesn't work. Maybe NW Eve

[jQuery] Re: event delegation - great, but how does one trigger the handlers through code?

2008-11-22 Thread ricardobeat
EMAIL PROTECTED] On > > Behalf Of ricardobeat > Sent: Saturday, November 22, 2008 7:43 AM > To: jQuery (English) > Subject: [jQuery] Re: event delegation - great, but how does one trigger the > handlers through code? > > Can't you just $('tbody td:eq(x)')

[jQuery] Re: event delegation - great, but how does one trigger the handlers through code?

2008-11-22 Thread Jeffrey Kretz
Behalf Of ricardobeat Sent: Saturday, November 22, 2008 7:43 AM To: jQuery (English) Subject: [jQuery] Re: event delegation - great, but how does one trigger the handlers through code? Can't you just $('tbody td:eq(x)').click() ? The event should propagate as normal and reach the tbody.

[jQuery] Re: event delegation - great, but how does one trigger the handlers through code?

2008-11-22 Thread ricardobeat
Can't you just $('tbody td:eq(x)').click() ? The event should propagate as normal and reach the tbody. I guess. On Nov 22, 1:11 am, Leeoniya <[EMAIL PROTECTED]> wrote: > During event delegation, handlers are registered higher in the DOM > tree and then filtered when the event is triggered. This i

[jQuery] Re: event delegation - great, but how does one trigger the handlers through code?

2008-11-21 Thread Leeoniya
thats what i was looking for, thanks! On Nov 21, 10:25 pm, "Jeffrey Kretz" <[EMAIL PROTECTED]> wrote: > I've used a pattern like this: > > var table = $('table.class') >    .bind('click',selectCell); > > function selectCell(e) > { >    var cell = e.target; >    do_something(); > > } > > var cell

[jQuery] Re: event delegation - great, but how does one trigger the handlers through code?

2008-11-21 Thread Jeffrey Kretz
I've used a pattern like this: var table = $('table.class') .bind('click',selectCell); function selectCell(e) { var cell = e.target; do_something(); } var cell = table.find('td.eq(8)'); selectCell.apply(table[0],[{target:cell[0]}]); JK -Original Message- From: jquery-en@googl

[jQuery] Re: event binding at bottom of page instead of ready() pitfalls?

2008-11-14 Thread Klaus Hartl
I have no link but used that approach for plazes.com. The only pitfall I came across is that some plugin's (in my case the datepicker) internally use the ready event, which can cause some troubles. Apart from that, perceived page loading/rendering was much much faster, especially since I put Goo

[jQuery] Re: Event Capture Architecture

2008-11-12 Thread Johannes Kupser
Can't you give the elements the same class and bind the class with the click event?

  1   2   >