Skip to content

Instantly share code, notes, and snippets.

@joemocha
Created April 19, 2011 01:41
Show Gist options
  • Save joemocha/926647 to your computer and use it in GitHub Desktop.
Save joemocha/926647 to your computer and use it in GitHub Desktop.
$(document).bind("comments:load", function(ev, data) {
var el = $(ev.target);
var params = data; //{record: "event:" + event_data.id, title_suffix: " Holla'd", enable_reply: false, pagination_off: true};
params["visible_page_count"] = el.find(".comment-page:visible").length;
if (arguments.length > 2) {
$.extend(params, arguments[2]);
}
$.post("/comments", params, function(newData) {
el.html(newData);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment