Skip to content

jhnlsn/heartbeat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Heartbeat

A generic heartbeat plugin for firing events on a set interval.

Getting Started

Download the production version or the development version.

In your web page:

<script src="jquery.js"></script>
<script src="dist/heartbeat.min.js"></script>
<script>
var hb = new HeartBeat({
    interval : 1000, // milliseconds between heartbeat events
    autostart : false, // autostart true | false (default)
    event : function(arr) {
        window._gaq.push(arr); // custom beat function
    }
});
</script>

Documentation

(Coming soon)

Examples

Delayed start

var hb = new HeartBeat({ autostart: false });

...

hb.start();

...

hb.stop();

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using grunt.

Also, please don't edit files in the "dist" subdirectory as they are generated via grunt. You'll find source code in the "src" subdirectory!

Release History

(Nothing yet)

License

Copyright (c) 2012 johnymonster
Licensed under the MIT, GPL licenses.

About

Generic heartbeat script

Resources

License

GPL-2.0, MIT licenses found

Licenses found

GPL-2.0
LICENSE-GPL
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published