Skip to content

Instantly share code, notes, and snippets.

@samueltcsantos
Forked from nealpoole/index.html
Last active Aug 29, 2015
Embed
What would you like to do?
<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