What is the module.js structure?


This file is divided into small self invoking modules. You can find below the used pattern.

// Module name: [module name]
// Dependencies: [JavaScript library/plugin which is required within this module]
// Docs: [path to the documentation of the required library/plugin]
(function(){
	'use strict';

	var vids = $('.js-video-advanced');

	vids.each(function() {
		var vid = $(this);
		var config = {};
		var userConfig = vid.data('config');
		$.extend(true, config, userConfig);
		
		vid.ytv(config);
	});

})();

Last update:
2015-09-30 16:23
Author:
Cristina Cavruc
Revision:
1.0
Average rating:0 (0 Votes)