Sunday, 15 August 2010

javascript - jQuery return 0 inputs in IE9 -



javascript - jQuery return 0 inputs in IE9 -

i having unusual problem. working in parallels test site in ie 9 on windows 7.

my setup jquery 2.1.1, bootstrap 3.2.

i validating form parsley if course of study worked in chrome, did nil in ie. when testing farther realized dom wasn't updating @ all. stripped out downwards see happening:

$(document).ready(function() { console.log('ready') /* form submit handler */ $('.submit').click(function(){ fields = $('#promo-form').find(':input'); console.log($(fields).length) }); }); chrome console: ready 15 ie 9 console (with f12 developer tools) log: ready log: 0

i can ie recognize simple selectors $('input'), $('form') cannot utilize jquery methods find collection. works fine in chrome on mac.

any ideas here? give thanks rich

have tried : http://jsfiddle.net/dhyjwg4l/

just tested in ie 10 / 11, don't have ie9 machine hand.

$(document).ready(function () { alert($("#promo-form :input").length); });

if didn't want textareas / buttons remove : before input, , wont counted.

$('#promo-form').find(':input'); //combine selector create $("#promo-form :input")

update : have tested on ie 8-11, , working on of them.

javascript jquery internet-explorer-9

No comments:

Post a Comment