Skip to content

Instantly share code, notes, and snippets.

@sergeykish
Created September 12, 2010 13:23
Show Gist options
  • Save sergeykish/576098 to your computer and use it in GitHub Desktop.
Save sergeykish/576098 to your computer and use it in GitHub Desktop.
livequery schema
$.extend($.fn, {
// plugin constructor
livequery: function(params) {
// used to find or create livequery object
var q = q || new $.livequery(params);
}
});
// constructor
$.livequery = function(params) {
// it push self into singleton query
$.livequery.queries.push(this);
};
// object methods
$.livequery.prototype = {
stop: function() {
// unbind event callback
// call stop callback
}
};
// singleton used to manage query
$.extend($.livequery, {
queries: [],
// for example stop call without id stops all query
stop: function(id) {
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment