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 image = new Image(); | |
image.src = "sample.jpg"; | |
$(image).load(function() { | |
ctx.drawImage(image, 0, 0); | |
}); | |
$(canvas).click(function(e) { | |
var canvasOffset = $(canvas).offset(); | |
var canvasX = Math.floor(e.pageX-canvasOffset.left); | |
var canvasY = Math.floor(e.pageY-canvasOffset.top); |
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
//Look for other responsivevoice instances | |
/*if (window.parent != null) { | |
var iframes = window.parent.document.getElementsByTagName('iframe'); | |
for (var i = 0; i < iframes.length; i++) { | |
//iframes[i].style.width = "300px" | |
} | |
}*/ | |
if (typeof responsiveVoice != 'undefined') { | |
console.log('ResponsiveVoice already loaded'); |