Skip to content

Instantly share code, notes, and snippets.

Created June 14, 2013 10:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save anonymous/5780952 to your computer and use it in GitHub Desktop.
Save anonymous/5780952 to your computer and use it in GitHub Desktop.
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) {
}
})(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