public static ChainableStatement toggle ( JsScope jsScope , JsScope jsScope2 , JsScope ... jsScopes ) { CharSequence [ ] args = null ; if ( jsScopes != null && jsScopes . length > 0 ) { args = new CharSequence [ jsScopes . length + 2 ] ; args [ 0 ] = jsScope . render ( ) ; args [ 1 ] = jsScope2 . render ( ) ; Integer index = 2 ; for ( JsScope scope : jsScopes ) { args [ index ] = scope . render ( ) ; index ++ ; } return new DefaultChainableStatement ( "toggle" , args ) ; } return toggle ( jsScope , jsScope2 ) ; }
Toggle among two or more function calls every other click .