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.

40 lines
651 B

  1. semantic.card = {};
  2. // ready event
  3. semantic.card.ready = function() {
  4. // selector cache
  5. var
  6. $card = $('.ui.product.cards .card, .ui.product.card, .ui.idea.cards .card, .ui.idea.card'),
  7. handler
  8. ;
  9. handler = {
  10. randomProgress: function(index) {
  11. var $this = $(this);
  12. setTimeout(function() {
  13. $this
  14. .find('.bar')
  15. .css('width', Math.floor(Math.random() * 100) + '%')
  16. ;
  17. }, index * 200);
  18. }
  19. };
  20. $.api.settings.api = {
  21. vote : '/api.json',
  22. follow : '/api.json'
  23. };
  24. $card
  25. .card()
  26. ;
  27. };
  28. // attach ready event
  29. $(document)
  30. .ready(semantic.card.ready)
  31. ;