Hello all,
I have just got a questioned answered and have fallen into another trap!
I have a form which is in a lightbox and I want to track every change in the select elements. When they change I want to get the value of each of the select elements. I have tried to do the following:
$('select.htt, select.hst').live('change', function() {
var channels = parseInt($('select.hst').val(), 10) * parseInt($('select.htt').val(), 10);
alert($('select.hst').val() + ' and ' + $('select.htt').val());
$('span.yellow2').html(channels);
});
However, the values are always the same i.e. the first option in each drop down box even though there are other options selected. I am guessing like somebody has explained before. The lightbox I am using takes a copy of these elements and makes changes to them and JQuery can not see this, but I have been told to reference the elements via classes which has worked but only up to this point.
What else can I try and what is the problem?
I really appreciate any help.
Thanks all