I have a function, say:
function some_name( that ) {
// do something here
}
This function gets called in 2 places. Place 1 is at document.ready and place 2 is when a button is clicked.
So:
// document.ready
function some_name();
...
// button click
function some_name( $(this) );
Now going back to the function itself, how do I check if that has been set?
One option is using
typeof:Another option is using
arguments:If you also need to check if element
$(this)exists on a page, you can uselength: