Liking cljdoc? Tell your friends :D

formative.dom


clear-problemscljs

(clear-problems container-or-form-el)

Clears form problems from the DOM

Clears form problems from the DOM
sourceraw docstring

get-form-elcljs

(get-form-el container-or-form-el)

Given a form container element or a form element, returns the form element

Given a form container element or a form element, returns the form element
sourceraw docstring

get-offset-topcljs

(get-offset-top el)

Returns an element's top offset relative to the window

Returns an element's top offset relative to the window
sourceraw docstring

get-scroll-topcljs

(get-scroll-top)

Returns the top window scroll position

Returns the top window scroll position
sourceraw docstring

handle-submitcljs

(handle-submit form-spec container-or-form-el success & [failure])

Attaches an event handler to a form's "submit" browser event, validates submitted data, then:

  • If validation fails, shows the problems (or, if provided, calls a custom failure function with the problems data as the argument)
  • If validation succeeds, calls a success function with parsed params as the argument
Attaches an event handler to a form's "submit" browser event, validates
submitted data, then:
  * If validation fails, shows the problems (or, if provided, calls a custom
    failure function with the problems data as the argument)
  * If validation succeeds, calls a success function with parsed params as
    the argument
sourceraw docstring

scroll-to-elcljs

(scroll-to-el el)

Scrolls the window to an element's offset top

Scrolls the window to an element's offset top
sourceraw docstring

serializecljs

(serialize form-el)

Returns a form data string for the given form element, suitable for Ajax GET/POST, or passing to formative.parse/parse-params.

Returns a form data string for the given form element, suitable for Ajax
GET/POST, or passing to formative.parse/parse-params.
sourceraw docstring

show-problemscljs

(show-problems form-spec container-or-form-el problems)

Shows form problems in the DOM

Shows form problems in the DOM
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close