Created
June 14, 2013 10:44
-
-
Save anonymous/5780952 to your computer and use it in GitHub Desktop.
This file contains 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) { | |
} | |
})(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