jQuery variable ada
if (typeof variable !== 'undefined') {
// the variable is defined
}
Indian Gooner
if (typeof variable !== 'undefined') {
// the variable is defined
}