[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.