javascript - My script not working in IE 10 and chrome -
i have below script works in ie10 compatibility mode , below fails in ie 10 , not work in chrome.
can 1 please @ , let me know should change make work?
i have group of dropdown lists gets values source , @ last have 2 dropdown select option .. when both of these selected using below create table row , dropdown boxes select default selected value .. happening is taking first option in dropdown list , making selected.
$(document).ready(function () { var = 0; var hiddencounterid = $('input[id$="hiddencounter"]').attr('id'); var hiddeniduse = '#' + hiddencounterid; $('.maintable1').on('change', 'tr:last select', function () { var $tr = $(this).parent().parent(); if ($tr.find('select :first').val() !== 'select' && $tr.find('select :last').val() !== 'select') $tr.clone(true).find('select').each(function () { $(this).val('').attr('name', function (_, name) { return 'ddllistitemval_' + i; }); }).end().insertafter($tr); i++; $('#' + hiddencounterid).val(i); }); });
change trying set values of new selects ''
'select'
works in standards compliant browsers.
Comments
Post a Comment