最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Does JQueries Live Work in IE8? - Stack Overflow

programmeradmin0浏览0评论

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: / - 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.

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

Share Improve this question asked Oct 26, 2009 at 11:34 AbsAbs 58k103 gold badges282 silver badges418 bronze badges
Add a ment  | 

3 Answers 3

Reset to default 9

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

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

Live also not support paste event Handler hence use bind

发布评论

评论列表(0)

  1. 暂无评论