Skip to content

Instantly share code, notes, and snippets.

@samueltcsantos
Forked from nealpoole/index.html
Last active August 29, 2015 14:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save samueltcsantos/fbd1a9df89b131043795 to your computer and use it in GitHub Desktop.
Save samueltcsantos/fbd1a9df89b131043795 to your computer and use it in GitHub Desktop.
<div id="issuu-widget">
</div>
<script type="text/javascript" src="/wp-includes/js/swfobject.js"></script>
<script type="text/javascript">
function loadIssuuWidget(result) {
var doc = result.response.docs[0];
var link = jQuery('<a />').attr({
href: 'http://issuu.com/browndailyherald/docs/' + doc.docname,
});
jQuery('<img id="issuu-thumbnail" />').attr({
src: 'http://image.issuu.com/' + doc.documentId + '/jpg/page_1_thumb_large.jpg',
width: 300
}).appendTo(link);
link.appendTo("#issuu-widget");
jQuery("#issuu-thumbnail").on("click", function(e) {
e.preventDefault();
var attributes = {
id: 'issuu-viewer'
};
var params = {
allowfullscreen: 'true',
menu: 'false',
wmode: 'transparent'
};
var flashvars = {
jsAPIClientDomain: 'www.browndailyherald.com',
mode: 'mini',
documentId: doc.documentId
};
swfobject.embedSWF("http://static.issuu.com/webembed/viewers/style1/v2/IssuuReader.swf", "issuu-widget", "300", "300", "9.0.0","swfobject/expressInstall.swf", flashvars, params, attributes);
});
}
</script>
<script type="text/javascript" src="http://search.issuu.com/api/2_0/document?username=browndailyherald&amp;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