Sign in through GitHub

Please read for an updated status on RailsCasts:

Learn more or hide this

Jordan Santell's Profile

GitHub User: jsantell

Site: http://www.jsantell.com

Comments by Jordan Santell

Avatar

$('#card_number').length is returning the size of the jQuery collection -- just selecting an ID, so yes, the length will be 1.

$('#card_number').val() is the value currently which the input field is currently holding