- Forums
- Javascipt
- How To Use If And Else Operator In Jquery An Example
this page will show you how you can use the if operator in jquery [848], Last Updated: Sat May 18, 2024
zcar
Tue Apr 24, 2012
0 Comments
310 Visits
this is an example i use for using the IF operator in javascript when using jquery.
$(document.body).click(function () {
if ($("div:first").is(":hidden")) {
$("div").slideDown("slow");
} else {
$("div").hide();
}
});
you can find the complete script at the jquery official site:
http://api.jquery.com/slideDown/