I want to have a line of code similar to below:
var name = $(\'#input-name\').attr(\"value\");
However, the id \'input-name\' is not guaran
Check for .length or .size() on the object. The select won't fail, jQuery will always return an object.