diff --git a/js/h5p.js b/js/h5p.js index 7f63c1f..eb685c5 100644 --- a/js/h5p.js +++ b/js/h5p.js @@ -139,14 +139,14 @@ H5P.init = function (target) { '
' + '
' + '') .prependTo($container) - .children() - .click(function () { - H5P.fullScreen($container, instance); - }) + .children().click(function () { + H5P.fullScreen($container, instance); + }) .keydown(function (e) { if (e.which === 32 || e.which === 13) { H5P.fullScreen($container, instance); @@ -214,7 +214,7 @@ H5P.init = function (target) { // Auto save current state if supported if (H5PIntegration.saveFreq !== false && ( - instance.getCurrentState instanceof Function || + instance.getCurrentState instanceof Function || typeof instance.getCurrentState === 'function')) { var saveTimer, save = function () { @@ -569,7 +569,7 @@ H5P.fullScreen = function ($element, instance, exitCallback, body, forceSemiFull } before('h5p-semi-fullscreen'); - var $disable = H5P.jQuery('
').appendTo($container.find('.h5p-content-controls')); + var $disable = H5P.jQuery('
').appendTo($container.find('.h5p-content-controls')); var keyup, disableSemiFullscreen = H5P.exitFullScreen = function () { if (prevViewportContent) { // Use content from the previous viewport tag @@ -924,27 +924,22 @@ H5P.Dialog = function (name, title, content, $element) {
\

' + title + '

\
' + content + '
\ -
\ +
\
\
') .insertAfter($element) .click(function () { self.close(); }) - .children('.h5p-inner') - .click(function () { - return false; - }) - .find('.h5p-close') - .click(function () { - self.close(); - }) - .end() - .find('a') - .click(function (e) { - e.stopPropagation(); - }) - .end() + .children('.h5p-inner').click(function () { + return false; + }) + .find('.h5p-close').click(function () { + self.close(); + }).end() + .find('a').click(function (e) { + e.stopPropagation(); + }).end() .end(); /**