jquery - IE 8 javascript problem -
hi following code throws "object doesn't support property or method" error in ie.. var value = $input.val().replace(/ /g, '').trim(); part of form validation, in every other browser working well, in ie doesnt..please help
from ben rowe: add following code add trim functionality string.
if(typeof string.prototype.trim !== 'function') { string.prototype.trim = function() { return this.replace(/^\s+|\s+$/g, ''); } }
Comments
Post a Comment