Skip to content

Commit

Permalink
Set the initial capacity and update it on refresh #4
Browse files Browse the repository at this point in the history
  • Loading branch information
NiGhTTraX committed Jun 30, 2014
1 parent 19b4574 commit 75ec005
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions javascripts/demo.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,12 @@ $(document).ready(function() {
revert: "invalid",
helper: "clone"
});

$(".fs").on("sortupdate", function() {
$(this).attr("data-content", $(this).fsortable("capacity"));
}).each(function() {
// Set the initial value of the attribute.
$(this).attr("data-content", $(this).find(".fsortable-empty").length);
});
});

0 comments on commit 75ec005

Please sign in to comment.