I usually check if the variable == 'undefined':
if (var == 'undefined') {
    // var is not set
}

I don't know if jQuery has one but it'd be simple to write your own.

This is untested but might work :)

$.extend({
    isset: function(var) {
        return (var != 'undefined');
    }
});

-Hector


On Tue, Nov 18, 2008 at 3:22 PM, yellow1912 <[EMAIL PROTECTED]> wrote:

>
> I wonder if jquery supports something like this? (like php isset()
> function)
> I know I can certainly write a function for it, but I dont want to re-
> invent the wheel if jquery already supports it
>
> Regards
>

Reply via email to