Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does JQueries Live Work in IE8?

I am making use of the JQuery fancy box - in this pop up box I have a form with a few select fields and upon changing these slect fields a value in a span element should change. I have got this to work (actually with stackoverflow users help) but the solution doesn't work in IE8...suprise...suprise.

I make changes to the select field but the value does not change. I was wondering if anyone could give me any ideas why this might be the case by just having a look at the following JS code. Does the live function now work in IE8?!!

JS Code:

$('select.htt, select.hst').live('change', function() {
    var channels = parseInt($('#fancy_div select.hst').val(), 10) * parseInt($('#fancy_div select.htt').val(), 10);         
    $('#fancy_div span.yellow2').html(channels + 'Channels');
});

I have pasted the HTML here: http://www.copypastecode.com/13356/ - its a lot of HTML!

Thanks all for any help or guidance why this isn't working on IE. IE doesn't seem to register the changes of the select fields.

like image 565
Abs Avatar asked Dec 05 '22 04:12

Abs


2 Answers

live does not support the change event. From the manual:

Possible event values: click, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, keydown, keypress, keyup
Currently not supported: blur, focus, mouseenter, mouseleave, change, submit

like image 115
karim79 Avatar answered Dec 09 '22 15:12

karim79


jQuery live does work in IE8, but the live handlers don't support the change event.

Possible event values: click, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, keydown, keypress, keyup

Currently not supported: blur, focus, mouseenter, mouseleave, change, submit

like image 39
tvanfosson Avatar answered Dec 09 '22 15:12

tvanfosson