Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
JMonkey.Action
Description
JMonkey actions.
Synopsis
- type JMonkey = JMonkeyM ()
- type JMonkeyM = Free Action
- data Action n
- data Cond
- putLog :: String -> JMonkey
- alert :: String -> JMonkey
- select :: Selector -> JMonkeyM Target
- add :: Target -> Selector -> JMonkey
- adds :: [Target] -> Selector -> JMonkey
- remove :: Target -> Selector -> JMonkey
- removes :: [Target] -> Selector -> JMonkey
- on :: String -> Target -> JMonkey -> JMonkey
- onClick :: Target -> JMonkey -> JMonkey
- onScroll :: Target -> JMonkey -> JMonkey
- onChange :: Target -> JMonkey -> JMonkey
- onTime :: Repeat -> Int -> JMonkey -> JMonkey
- ifel :: Cond -> JMonkey -> JMonkey -> JMonkey
- ifThen :: Cond -> JMonkey -> JMonkey
- elThen :: Cond -> JMonkey -> JMonkey
Types
JMonkey action AST.
JMonkey conditions. These mean boolean value.
Show
Selection
Selector Modification
add :: Target -> Selector -> JMonkey Source #
Add class or id to the target.
For multiple selectors
f :: Target -> [Selector] -> JMonkey
f t = mapM_ (add
t)
adds :: [Target] -> Selector -> JMonkey Source #
Add class or id to the targets.
For multiple selectors
f :: [Target] -> [Selector] -> JMonkey
f ts = mapM_ (adds
ts)
On Event
Arguments
:: String | an event name like "click", "scroll", ...etc |
-> Target | a target related to the event |
-> JMonkey | an action triggered by the event |
-> JMonkey |
Make event.
Time Triggered Event
Arguments
:: Repeat | repetition |
-> Int | delay time (milliseconds) |
-> JMonkey | an action on the time |
-> JMonkey |
Make time triggered event.