Skip to content

Instantly share code, notes, and snippets.

Last active February 22, 2017 21:49
What would you like to do?
Simple example code for displaying an Issuu widget with a thumbnail preview. Degrades gracefully if JS is not enabled.
<div id="issuu-widget">
<script type="text/javascript" src="/wp-includes/js/swfobject.js"></script>
<script type="text/javascript">
function loadIssuuWidget(result) {
var doc =[0];
var link = jQuery('<a />').attr({
href: '' + doc.docname,
jQuery('<img id="issuu-thumbnail" />').attr({
src: '' + doc.documentId + '/jpg/page_1_thumb_large.jpg',
width: 300
jQuery("#issuu-thumbnail").on("click", function(e) {
var attributes = {
id: 'issuu-viewer'
var params = {
allowfullscreen: 'true',
menu: 'false',
wmode: 'transparent'
var flashvars = {
jsAPIClientDomain: '',
mode: 'mini',
documentId: doc.documentId
swfobject.embedSWF("", "issuu-widget", "300", "300", "9.0.0","swfobject/expressInstall.swf", flashvars, params, attributes);
<script type="text/javascript" src=";sortBy=epoch&amp;pageSize=1&amp;jsonCallback=loadIssuuWidget"></script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment