[jQuery] Re: jQuery 1.4 change event problem
Same here, would love to hear an answer. On Jan 19, 11:00 am, Steven Yang kenshin...@gmail.com wrote: Hi all I apologize if this problem has been post or report. I have a problem using jQuery 1.4 when i use $(#mySelect).change(function(){...my logic...}) This problem only occurs in IE. 6-8 all have the same problem and jQuery 1.3.2 does not have this problem. This problem occurs when I bind a change event on a select and when the page is loaded the selected option is not the first one. What will happen is when I click on the select and not even have a chance to choose my option, the change event is fired. But after the first change, things works normally. i made a simple sample here:http://jsbin.com/apufa/http://jsbin.com/apufa/edit you will notice when you click on the select the alert will fire, but it should only be fired when i actually change the option. is this a bug? Thanks
[jQuery] Re: jQuery messing with this?
Works like a charm :) Thanks a lot (too bad I already made a detour ;) ). On Feb 20, 2:20 pm, akzhan akzhan.abdu...@gmail.com wrote: It's common practice to copy this variable to local self (var self = this). And it works fine. $(select.zmiana_daty_wysylki).each(function () { var self = this; /* do some stuff to select */ $('option', this).each(function () { /* operate on each option, and self will point to select. */ }); }); On 20 фев, 13:41, pambuk wojtek.zymo...@gmail.com wrote: I know thatjQueryoverwrites 'this', but I never had a problem with that until now. Maybe some of you know a better way or maybe I took a wrong turn somewhere. What I'm basically trying to do is to iterate selects (dropdowns), do something with them, and while I'm iterating selects, iterate options of a every select, it looks like this (except for the inside logic): $(select.zmiana_daty_wysylki).each(function (i) { var select = this; /* do some stuff to select */ select.find('option').each(function (ii) { /* operate on each option */ }); }); Is this doable? If I remove iterating options (select.find ('option').each(...)), everything works fine of course, so nothing inside first loop is broken.
[jQuery] jQuery messing with this?
I know that jQuery overwrites 'this', but I never had a problem with that until now. Maybe some of you know a better way or maybe I took a wrong turn somewhere. What I'm basically trying to do is to iterate selects (dropdowns), do something with them, and while I'm iterating selects, iterate options of a every select, it looks like this (except for the inside logic): $(select.zmiana_daty_wysylki).each(function (i) { var select = this; /* do some stuff to select */ select.find('option').each(function (ii) { /* operate on each option */ }); }); Is this doable? If I remove iterating options (select.find ('option').each(...)), everything works fine of course, so nothing inside first loop is broken.
[jQuery] Re: Tablesorter and event handlers on table rows
Don't take this the wrong way, but I love you man, everything works great, thanks a lot :) On Nov 29, 9:10 am, Christian Bach [EMAIL PROTECTED] wrote: Hi Guys, This issue has been resolved in the latest tablesorter release. Get it from:http://tablesorter.com/ /Christian 2007/11/29, pambuk [EMAIL PROTECTED]: Hi, I have the exact same problem and frankly, I'm out of ideas. Last thing I tried was writing a widget, to rebind events, but clicks are fired n+1 number of sortings. I'm a JS (and jQuery) noob, but I'd really appreciate a solution / workaround / hack / whatever. I guess I'll sort the table through ajax or even reload the page :/, too bad, because I really liked the idea of using tablesorter. Raymond, could you please describe your workaround? On Nov 8, 3:20 pm, Raymond78 [EMAIL PROTECTED] wrote: Hi, First, a big thanks for creating this great plugin! Very nice. I am using TableSorter 2.0 on a table which contains rows on which I have added some event handlers (using jquery; the events have nothing to do with sorting, they're for highlighting and processing clicks). These event handlers work fine, until I click on a column heading to sort the table. The sorting works fine, but the event handlers don't work anymore. After having a look at the sourcecode, it seems to me that TableSorter effectively removes any event handlers because of the way it sorts the table. I studied all documentation and examples, but I couldn't find anything to do this. (There is something to trigger sorting, but that is the other way around.) My question is, is this correct, or am I overlooking something here? Is there is any way to preserve the row event handlers? For now, I have created a small workaround by passing an extra parameter that contains a function call, which is called after the sorting is finished; but if there is already a way to do this I'd like to know. I hope someone can help me out. Thanks in advance. Kind regards, Raymond
[jQuery] Re: Tablesorter and event handlers on table rows
Hi, I have the exact same problem and frankly, I'm out of ideas. Last thing I tried was writing a widget, to rebind events, but clicks are fired n+1 number of sortings. I'm a JS (and jQuery) noob, but I'd really appreciate a solution / workaround / hack / whatever. I guess I'll sort the table through ajax or even reload the page :/, too bad, because I really liked the idea of using tablesorter. Raymond, could you please describe your workaround? On Nov 8, 3:20 pm, Raymond78 [EMAIL PROTECTED] wrote: Hi, First, a big thanks for creating this great plugin! Very nice. I am using TableSorter 2.0 on a table which contains rows on which I have added some event handlers (using jquery; the events have nothing to do with sorting, they're for highlighting and processing clicks). These event handlers work fine, until I click on a column heading to sort the table. The sorting works fine, but the event handlers don't work anymore. After having a look at the sourcecode, it seems to me that TableSorter effectively removes any event handlers because of the way it sorts the table. I studied all documentation and examples, but I couldn't find anything to do this. (There is something to trigger sorting, but that is the other way around.) My question is, is this correct, or am I overlooking something here? Is there is any way to preserve the row event handlers? For now, I have created a small workaround by passing an extra parameter that contains a function call, which is called after the sorting is finished; but if there is already a way to do this I'd like to know. I hope someone can help me out. Thanks in advance. Kind regards, Raymond