I do have a css class name “.className”
How to create an if statement wherein if the user does not click .className it will alert.
for example:
if (click != $('.className')) {
alert("You did not click className");
}
I know that my code is incorrect. How to do it? Btw, this is similar to an outside click.
Thank you.
demo: http://jsfiddle.net/yaqLs/
EDIT: If by “outside clicks” you mean not just links then,
demo: http://jsfiddle.net/yaqLs/1/