Hi, I am looking for
if(condion)
{
}
elseif()
{
}
else
{
}
Is this supported in JQuery. I have seen in some place but cannot get it worked in my SP designer.
Any right directions please? Hari
Hi, I am looking for
if(condion)
{
}
elseif()
{
}
else
{
}
Is this supported in JQuery. I have seen in some place but cannot get it worked in my SP designer.
Any right directions please? Hari
Just add a space:
if (...) {
} else if(...) {
} else {
}
JavaScript's elseif is in the format "else if", e.g.:
if (condition) {
} else if (other_condition) {
} else {
}
YES SYNTAX OF else if in jquery is
else if
you need to add space!!! do not forget to add space, jquery is very very strict about it!! ;) lol
There's also a jQuery plugin by Ben Alman that lets you do conditionals inline and chainable, I personally don't like it as too much chaining just mess the code up and makes it less readable. But anyway, here's the link: http://benalman.com/projects/jquery-cond-plugin/