Git Product home page Git Product logo

jquery-csswatch's Introduction

jQuery csswatch event/plugin

http://github.com/leifcr/jquery-csswatch/

With jQuery css-watch, you can watch css changes

It uses requestAnimationFrame (webkitRequestAnimationFrame, mozRequestAnimationFrame, oRequestAnimationFrame, msRequestAnimationFrame) for polling and verifying if any changes to the CSS has been made for the given CSS attributes. It falls back to a timer in case the browser doesn't support requestAnimationFrame.

Documentation

For now, please see the tests and examples

Usage

This is both released as a bower component and a npm module, to suit whatever build tool/env you are using for your frontend.

Using npm

npm install jquery-csswatch
<script type="text/javascript" src="../node_modules/execute_method/dist/execute_method.js"></script>
<script type="text/javascript" src="../node_modules/jquery-csswatch/dist/jquery-csswatch.js"></script>

Using bower

bower install jquery-csswatch
<script type="text/javascript" src="../bower_components/execute_method/dist/execute_method.js"></script>
<script type="text/javascript" src="../bower_components/jquery-csswatch/dist/jquery-csswatch.js"></script>

Building

You need to setup grunt + npm to develop/build

  # install dependencies
  npm install

  # Build library, run unit tests and create minified version
  grunt

Examples

A working example can be found here: See http://leifcr.github.com/jquery-csswatch/examples/

Requirements

For building:
  • CoffeeScript 1.4 + (For building the library)

Development

Development is made in chrome and firefox on jQuery 2.x. Please fork, make a feature or bugfix branch and request a pull request.

Testing

jQuery Versions

  • 1.8.x
  • 1.9.x
  • 2.1.x

Browsers Tested

  • Chrome 23
  • Chrome SxS/Canary (25.0.1337 (169859))
  • Internet Explorer 7,8,9
  • Firefox
  • Opera 11.6

Unit Tests

http://leifcr.github.com/jquery-csswatch/unit/

Release History

1.3.1 - (2014-09-19) Fixed bower.json (Thanks @staszekj)
1.3.0 - (2014-08-06) Moved to npm/bower packaging. ExecuteMethod added as a dependency
1.2.1 - (2013-10-27) Improved version, using cake
1.0 - (2012-11-22) Initial release

License

Copyright (c) 2012 Leif Ringstad Licensed under the freeBSD license.

Since it's free, please give me a thanks, beer, pizza, gadget or what you feel for.

jquery-csswatch's People

Contributors

leifcr avatar

Watchers

James Cloos 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.