Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
jQuery bindings for Fay (experimental)
Haskell
tag: 0.4.0.1

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
src
.gitignore
LICENSE
README.md
Setup.hs
fay-jquery.cabal
test.hs
test.html

README.md

Fay jQuery

jQuery bindings for Fay. This project is experimental and not suitable for production purposes.

The short-term goals of this project are to help discover the real world requirements of Fay and to invite bikeshedding over the fay-jquery API. That means that names and types may change in rapid and annoying ways until conventions settle down.

The one consistent convention in the library is that the jQuery object on which methods operate is the last parameter to every function. This allows simple monadic composition:

makeSquare :: JQuery -> Fay JQuery
makeSquare = addClass "square" >=>
             setWidth 400 >=>
             setHeight 400

main :: Fay ()
main = do
    makeSquare $ select "#elementToMakeSquare"
    return ()

Usage

To use this with fay, cabal install the package which will put the source files in fay ~/.cabal/share/fay-jquery-0.1.0.0/src. You can then compile with fay using

in fay >= 0.12:

fay --package fay-jquery MyFile.hs

in fay < 0.12:

fay --include=~/.cabal/share/fay-jquery-0.1.0.0/src MyFile.hs

Supported API calls

This binding is a work in progress. I'm adding calls by section of the jQuery docs. There is some overlap in the sections, but the following sections are (mostly) complete.

  • Ajax
  • Attributes
  • Core
  • CSS
  • Effects (Basic, Fading)
  • Manipulation
  • Traversing

Still to do

  • Data
  • Deferred Object
  • Effects (Custom, Sliding)
  • Events
  • Forms
  • Internals
  • Miscellaneous
  • Offset
  • Plugins
  • Properties
  • Utilities

Not Applicable

  • Selectors
Something went wrong with that request. Please try again.