You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

52 lines
1.1 KiB

  1. semantic.icon = {};
  2. // ready event
  3. semantic.icon.ready = function() {
  4. // selector cache
  5. var
  6. $grid = $('.ui.six.column.doubling.grid'),
  7. // alias
  8. handler
  9. ;
  10. // event handlers
  11. handler = {
  12. createTable: function() {
  13. var
  14. $grid = $(this),
  15. columnCount = 6
  16. ;
  17. $grid
  18. .find('.column:nth-child('+columnCount+'n+1)')
  19. .each(function() {
  20. var
  21. $group = $(this)
  22. .nextAll(':lt('+ (columnCount - 1) +')')
  23. .andSelf()
  24. ;
  25. $group.wrapAll('<div class="row"></div>');
  26. $group.filter('[data-content]').popup({
  27. position: 'top center',
  28. variation: 'large inverted',
  29. transition: 'fade up',
  30. delay: {
  31. show: 200,
  32. hide: 0
  33. }
  34. });
  35. })
  36. .end()
  37. .addClass('middle aligned internally celled')
  38. ;
  39. }
  40. };
  41. $grid.each(handler.createTable);
  42. };
  43. // attach ready event
  44. $(document)
  45. .ready(semantic.icon.ready)
  46. ;