Skip to content

kuangwk/css-watch-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

css-watch-plugin

Description:

  • This is a jquery plugin that watch change of css property.
  • What makes it outstanding is that
    • It can monitor some jquery complex property like offset, outerWidth;
    • It uses polling, which means that every change can be dectected;
    • There is runs, stop and reset apis, which can help you comfortablly control it.

Usage:

  1. init:

    $.watcher.runs(100);
    
  2. add watching

    $('div').watch(['offset', 'width'], function whenChange(){
        console.log('some properties changed')
    })
    
  3. unwatch

    $('div').unwatch()
    
  4. stop

    $.watcher.stop()
    
  5. reset => clear all watching

$.watcher.reset()

About

This is a jquery that watch change of css property

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published