loadingbar-demo.js 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /* Loading bars */
  2. $(function() {
  3. "use strict";
  4. $(".loadingbar-demo").loadingbar({
  5. direction: "left",
  6. done: function(data) {
  7. $.each(data.items, function(i, item) {
  8. $("<img/>").attr("src", item.media.m).prependTo($("#loading-frame"));
  9. if (i === 2) {
  10. return false;
  11. }
  12. });
  13. }
  14. });
  15. });
  16. $(function() {
  17. "use strict";
  18. $(".loadingbar-demo-right").loadingbar({
  19. direction: "right",
  20. done: function(data) {
  21. $.each(data.items, function(i, item) {
  22. $("<img/>").attr("src", item.media.m).prependTo($("#loading-frame"));
  23. if (i === 2) {
  24. return false;
  25. }
  26. });
  27. }
  28. });
  29. });
  30. $(function() {
  31. "use strict";
  32. $(".loadingbar-demo-down").loadingbar({
  33. direction: "down",
  34. done: function(data) {
  35. $.each(data.items, function(i, item) {
  36. $("<img/>").attr("src", item.media.m).prependTo($("#loading-frame"));
  37. if (i === 2) {
  38. return false;
  39. }
  40. });
  41. }
  42. });
  43. });
  44. $(function() {
  45. "use strict";
  46. $(".loadingbar-demo-up").loadingbar({
  47. direction: "up",
  48. done: function(data) {
  49. $.each(data.items, function(i, item) {
  50. $("<img/>").attr("src", item.media.m).prependTo($("#loading-frame"));
  51. if (i === 2) {
  52. return false;
  53. }
  54. });
  55. }
  56. });
  57. });