Skip to content
Snippets Groups Projects
reveal.js 29.1 KiB
Newer Older
  • Learn to ignore specific revisions
  • 		getIndices: function() {
    			return { 
    				h: indexh, 
    				v: indexv 
    			};
    		},
    
    		// Returns the previous slide element, may be null
    		getPreviousSlide: function() {
    			return previousSlide
    		},
    
    		// Returns the current slide element
    		getCurrentSlide: function() {
    			return currentSlide
    		},
    
    
    		// Helper method, retrieves query string as a key/value hash
    		getQueryHash: function() {
    			var query = {};
    
    			location.search.replace( /[A-Z0-9]+?=(\w*)/gi, function(a) {
    				query[ a.split( '=' ).shift() ] = a.split( '=' ).pop();
    			} );
    
    			return query;
    		},
    
    
    		// Forward event binding to the reveal DOM element
    		addEventListener: function( type, listener, useCapture ) {
    
    hakimel's avatar
    hakimel committed
    			if( 'addEventListener' in window ) {
    				( dom.wrapper || document.querySelector( '.reveal' ) ).addEventListener( type, listener, useCapture );
    			}
    
    		},
    		removeEventListener: function( type, listener, useCapture ) {
    
    hakimel's avatar
    hakimel committed
    			if( 'addEventListener' in window ) {
    				( dom.wrapper || document.querySelector( '.reveal' ) ).removeEventListener( type, listener, useCapture );
    			}