JQuery -Variable existiert

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