/
githubmirror
/
materialize
Обзор
Документация
Войти
/
githubmirror
/
materialize
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
v0.97.2
js/global.js
44 строки
990 B
Alvin Wang
Added unminified css to meteor
17 окт 2015, 23:14
17 окт 2015, 23:14
54543ce
Код
Авторство
О чём код?
// Required for Meteor package, the use of window prevents export by Meteor (function(window){ if(window.Package){ Materialize = {}; } else { window.Materialize = {}; } })(window); // Unique ID Materialize.guid = (function() { function s4() { return Math.floor((1 + Math.random()) * 0x10000) .toString(16) .substring(1); } return function() { return s4() + s4() + '-' + s4() + '-' + s4() + '-' + s4() + '-' + s4() + s4() + s4(); }; })(); Materialize.elementOrParentIsFixed = function(element) { var $element = $(element); var $checkElements = $element.add($element.parents()); var isFixed = false; $checkElements.each(function(){ if ($(this).css("position") === "fixed") { isFixed = true; return false; } }); return isFixed; }; // Velocity has conflicts when loaded with jQuery, this will check for it var Vel; if ($) { Vel = $.Velocity; } else { Vel = Velocity; }