fn toggle(a: DivHandle, b: DivHandle) {
    a.show().expect("Error");
    b.hide().expect("Error");
    let closure = move || {
        toggle(b, a);
    };
    set_timeout(closure, 1000);
}
// Function that takes to div, shows the first and hides the second
// and then calls itself again delayed, with the two div swapped
Function that takes to div, shows the first and hides the second
and then calls itself again delayed, with the two div swapped
Function that takes to div shows the first and hides the second and then calls itself again delayed with the two div swapped
fn toggle(a: DivHandle, b: DivHandle) {
    a.show().expect("Error");
    b.hide().expect("Error");
    let closure = move || {
        toggle(b, a);
    };
    set_timeout(closure, 1000);
}
fn toggle ( a : DivHandle , b : DivHandle ) { a . show ( ) . expect ( " " ) ; b . hide ( ) . expect ( " " ) ; let closure = move | | { toggle ( b , a ) ; } ; set_timeout ( closure , 1000 ) ; }
Function that takes to div, shows the first and hides the second
and then calls itself again delayed, with the two div swapped
Function that takes to div shows the first and hides the second and then calls itself again delayed with the two div swapped
a
DivHandle
b
DivHandle
a
DivHandle
b
DivHandle