As discussed in many questions on stack – IE 8 wont accept .trim(), but the jQuery framework takes care of that.
I don’t know how to translate my function to use that version of trim (I thought I was already using jQuery), could someone advise? Here is my code:
$('input').val(function(index, val){
return val.replace('Please Select', '').trim();
});
This is designed to replace the string with nothing.
I’ve tried:
$('input').val(function(index, val){
return val.replace('Please Select', '')$.trim();
});
but that was no good.
http://api.jquery.com/jQuery.trim/