Skip to content

Instantly share code, notes, and snippets.

@limarc
Last active August 29, 2015 14:04
Show Gist options
  • Select an option

  • Save limarc/e46d8b6a8d0140f374f9 to your computer and use it in GitHub Desktop.

Select an option

Save limarc/e46d8b6a8d0140f374f9 to your computer and use it in GitHub Desktop.
Spoiler ui
/*
* ...
*/
(function(global) {
'use strict';
/*
* Constructor.
*
* @param {Mixed} element The jquery object or selector.
* @param {Object} config The config.
*/
global.Spoiler = function(element, config) {};
/*
* ...
*
* @private
* @param {HTMLElement} elementNode The element.
*
* @returns {Object} The transition properties.
*/
Spoiler.getTransition = function(elementNode) {
};
/*
* ...
*
* @private
* @param {HTMLElement} elementNode The element.
* @param {Object} properties The transition properties.
*/
Spoiler.setTransition = function(elementNode, properties) {
if (!properties) {
properties = {
// default params.
};
}
};
/*
* ...
*
* @param {HTMLElement} elementNode The element.
* @param {Object} properties The properties.
*
* @returns {Object} The dimensions.
*/
Spoiler.getComputedStyle = function(elementNode, properties) {
};
/*
* Advanced support initialize the module.
* The AMD module, CommonJS module and simple global initialize.
*/
if (typeof global.define === 'function' && global.define.amd !== undefined) {
global.define(function() {
return global.Drop;
});
} else if (typeof global.module !== 'undefined' && global.module.exports !== undefined) {
global.module.exports = global.Drop;
}
})(window || global);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment