Trying to figure out a way to insert a condition in Jquery sequence of commands. Basically my point is I can save the code length.
Example:
var first=true;
if(first){
ap.nextAll("div").first()....
}else{
ap.nextAll("div").last()....
}
and whether it can do something like this:
ap.nextAll("div").(first?first():last())....
This is the only example I know that it could be solve : last
, but it just as an example.
Thanks Pesulap