jquery varable exists code example Example: jquery varable exists if (typeof variable !== 'undefined') { // the variable is defined }