GithubHelp home page GithubHelp logo

fay-jquery's Introduction

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. You can then compile with fay using

fay --include=~/.cabal/share/fay-jquery-0.1.0.0 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.

  • Attributes
  • Core
  • CSS
  • Manipulation
  • Traversing

Still to do

  • Ajax
  • Data
  • Deferred Object
  • Effects
  • Events
  • Forms
  • Internals
  • Miscellaneous
  • Offset
  • Plugins
  • Properties
  • Utilities

Not Applicable

  • Selectors

fay-jquery's People

Contributors

brianhv avatar bergmark avatar stepcut avatar

Watchers

James Cloos avatar Ben Gamari avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.