I would like to add some explanations to each slide of an embedded swipe.to presentation. Therefore I am trying to count the times a button within the iframe is pressed or c
It is possible this way:
//left arrow
$(document.getElementById('frame-id').contentWindow.document).keydown(function(e){
if(e.keyCode == 37){
i--;
};
});
//right arrow and space bar
$(document.getElementById('test').contentWindow.document).keydown(function(e){
if(e.keyCode == 32 || e.keyCode == 39){
i++;
};
});
This should be embedded within $('body iframe').load(function(){ }