like this >

Code: Select all
Enumeration
#Window
#Card
EndEnumeration
Procedure CardEvent()
Static newX = 10
Protected GID = GadgetID(#Card)
If newX = 10
newX = WindowWidth(#Window) - GadgetWidth(#Card) - 10
Else
newX = 10
EndIf
! $(v_gid.div).animate({ left: so_cardevent$v_newx + "px" }, 1000 ); // -> https://api.jquery.com/animate/
EndProcedure
OpenWindow(#Window, 0, 0, 1000, 200, "", #PB_Window_ScreenCentered)
ContainerGadget(#Card, 10, 10, 180, 180) : CloseGadgetList()
SetGadgetColor(#Card, #PB_Gadget_BackColor, #Red)
GID = GadgetID(#Card)
! $(v_gid.div).click(f_cardevent);
but on this line > what means " so_cardevent " ? it shouldn't be f_cardevent, because cardevent() is a procedure?Peter wrote: Sat Jun 12, 2021 1:00 pmCode: Select all
! $(v_gid.div).animate({ left: so_cardevent$v_newx + "px" }, 1000 ); // -> https://api.jquery.com/animate/
so_cardevent$v_newx is the 'internal' JavaScript-Name of the static newX -Variableskinkairewalker wrote: Sat Jun 12, 2021 3:22 pmbut on this line > what means " so_cardevent " ? it shouldn't be f_cardevent, because cardevent() is a procedure?