We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bc804de commit a34ab8dCopy full SHA for a34ab8d
1 file changed
src/utilities.js
@@ -0,0 +1,23 @@
1
+function loadGoogleSheet(link) {
2
+ return new Promise((resolve, reject) => {
3
+ Tabletop.init({
4
+ key: link,
5
+ callback: data => {
6
+ results = data.Sheet1.elements;
7
+ resolve(results);
8
+ }
9
+ });
10
11
+}
12
+
13
+$.fn.shuffleChildren = function() {
14
+ $.each(this.get(), function(index, el) {
15
+ var $el = $(el);
16
+ var $find = $el.children();
17
+ $find.sort(function() {
18
+ return 0.5 - Math.random();
19
20
+ $el.empty();
21
+ $find.appendTo($el);
22
23
+};
0 commit comments