There is a function that works fine in all browsers except ie. tell me what's wrong ....

function findItemResult() { var activeInput = district.find("input:checked"); arr = []; activeInput.each(function( index ) { item = $(this).attr("id"); arr.push(item.substring(10,18)); }); return arr; }; 
Ie error: The object does not support the property or the substring method. substr (), slice () is similar.

  • and the length of the string "id" for all elements is more than 10 and less than 18 characters? - Den
  • Check that you have this and item at the time of the exception. - Sergey Gornostaev
  • string length always falls in this range - Vital
  • the data is correct in this and item - Vital
  • 2
    @Vital, put item before item var ... - MedvedevDev

0