Update methods.js

Change $el.val().trim() to $.trim($el.val()) to make it works in IE8