Skip to content

Instantly share code, notes, and snippets.

@ezos86
Created August 19, 2013 18:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ezos86/6272565 to your computer and use it in GitHub Desktop.
Save ezos86/6272565 to your computer and use it in GitHub Desktop.
jQuery Variable Error - Object has no method '.val()' or any other method. - it normally results from a Global variable error. Example VS below
var country = $('.countryCodeAlpha2');
var x = country.val();
console.log(x);
VS
var country = $('.countryCodeAlpha2').val;
console.log(country);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment