juanpa_1982

Untitled

Nov 27th, 2014
372
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //js file
  2. Template.workingarea.events({
  3. 'click div.onoffswitch input[type="radio"]': function (event) {
  4.         var workingarea = $(event.currentTarget).closest("div.workingarea");
  5.         var id = $(event.currentTarget).attr("data-id");
  6.         var tables = workingarea.find("div.grouped-table");
  7.  
  8.         $.each(tables, function () {
  9.             if ($(this).is(":visible")) {
  10.                 $(this).hide({
  11.                     effect: "drop",
  12.                     duration: "fast",
  13.                     complete: function () {
  14.                         $("#" + id).show("drop", {}, "fast");
  15.                     }
  16.                 });
  17.             }
  18.         });
  19.     }
  20. });
Advertisement
Add Comment
Please, Sign In to add comment