-
-
Save ismasan/5782289 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Jellybooks = Jellybooks || {} | |
/* API classes and utilities | |
--------------------------------------*/ | |
Jellybooks.Widget = (function ($) { | |
var widgetCount = 0; | |
var iframeTemplate = $('<iframe name="widget_frame">'); | |
var Widget = function () { | |
} | |
Widget.prototype.appendTo = function (jbuid, size, showCover) { | |
} | |
return Widget | |
})(jQuery); | |
/* HTML5 hooks | |
--------------------------------------*/ | |
;(function ($) { | |
var markup = $('[data-widget="JbBook"]') | |
markup.each(function (i, e) { | |
e = $(e) | |
var jbuid = e.data('jbuid'), | |
size = e.data('size'), | |
showCover = e.data('showcover'); | |
console.log(jbuid, size, showCover) | |
new Jellybooks.Widget(jbuid, size, showCover).appendTo(e) | |
}) | |
})(jQuery); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment