/
githubmirror
/
fullPage.js
Обзор
Документация
Войти
/
githubmirror
/
fullPage.js
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
src/js/jquery-adaptor.js
32 строки
909 B
Alvaro Trigo López
- Reducing output file size a bit more
27 мар 2022, 20:00
27 мар 2022, 20:00
d2ba3ea
Код
Авторство
О чём код?
import * as utils from './common/utils.js'; import { FP, win } from "./common/constants.js"; import { getOptions } from "./common/options.js"; import fullpage from './fullpage.js'; /** * jQuery adapter for fullPage.js 3.0.0 */ // @ts-ignore if(win.jQuery){ (function ($, fullpage) { 'use strict'; // No jQuery No Go if (!$ || !fullpage) { utils.showError('error', 'jQuery is required to use the jQuery fullpage adapter!'); return; } $.fn.fullpage = function(options) { options = $.extend({}, options, {'$': $}); var instance = new fullpage(this[0], options); // Creating the $.fn.fullpage object Object.keys(FP).forEach(function (key) { getOptions().$.fn.fullpage[key] = FP[key]; }); }; // @ts-ignore })(win.jQuery, fullpage); }