adding initial fast-api
This commit is contained in:
3
fast-api/bower_components/Morphext/dist/morphext.css
vendored
Normal file
3
fast-api/bower_components/Morphext/dist/morphext.css
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
.morphext > .animated {
|
||||
display: inline-block;
|
||||
}
|
||||
77
fast-api/bower_components/Morphext/dist/morphext.js
vendored
Normal file
77
fast-api/bower_components/Morphext/dist/morphext.js
vendored
Normal file
@@ -0,0 +1,77 @@
|
||||
/*!
|
||||
* Morphext - Text Rotating Plugin for jQuery
|
||||
* https://github.com/MrSaints/Morphext
|
||||
*
|
||||
* Built on jQuery Boilerplate
|
||||
* http://jqueryboilerplate.com/
|
||||
*
|
||||
* Copyright 2014 Ian Lai and other contributors
|
||||
* Released under the MIT license
|
||||
* http://ian.mit-license.org/
|
||||
*/
|
||||
|
||||
/*eslint-env browser */
|
||||
/*global jQuery:false */
|
||||
/*eslint-disable no-underscore-dangle */
|
||||
|
||||
(function ($) {
|
||||
"use strict";
|
||||
|
||||
var pluginName = "Morphext",
|
||||
defaults = {
|
||||
animation: "bounceIn",
|
||||
separator: ",",
|
||||
speed: 2000,
|
||||
complete: $.noop
|
||||
};
|
||||
|
||||
function Plugin (element, options) {
|
||||
this.element = $(element);
|
||||
|
||||
this.settings = $.extend({}, defaults, options);
|
||||
this._defaults = defaults;
|
||||
this._init();
|
||||
}
|
||||
|
||||
Plugin.prototype = {
|
||||
_init: function () {
|
||||
var $that = this;
|
||||
this.phrases = [];
|
||||
|
||||
this.element.addClass("morphext");
|
||||
|
||||
$.each(this.element.text().split(this.settings.separator), function (key, value) {
|
||||
$that.phrases.push($.trim(value));
|
||||
});
|
||||
|
||||
this.index = -1;
|
||||
this.animate();
|
||||
this.start();
|
||||
},
|
||||
animate: function () {
|
||||
this.index = ++this.index % this.phrases.length;
|
||||
this.element[0].innerHTML = "<span class=\"animated " + this.settings.animation + "\">" + this.phrases[this.index] + "</span>";
|
||||
|
||||
if ($.isFunction(this.settings.complete)) {
|
||||
this.settings.complete.call(this);
|
||||
}
|
||||
},
|
||||
start: function () {
|
||||
var $that = this;
|
||||
this._interval = setInterval(function () {
|
||||
$that.animate();
|
||||
}, this.settings.speed);
|
||||
},
|
||||
stop: function () {
|
||||
this._interval = clearInterval(this._interval);
|
||||
}
|
||||
};
|
||||
|
||||
$.fn[pluginName] = function (options) {
|
||||
return this.each(function() {
|
||||
if (!$.data(this, "plugin_" + pluginName)) {
|
||||
$.data(this, "plugin_" + pluginName, new Plugin(this, options));
|
||||
}
|
||||
});
|
||||
};
|
||||
})(jQuery);
|
||||
1
fast-api/bower_components/Morphext/dist/morphext.min.js
vendored
Normal file
1
fast-api/bower_components/Morphext/dist/morphext.min.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
/*! Morphext - v2.4.4 - 2015-05-21 */!function(a){"use strict";function b(b,c){this.element=a(b),this.settings=a.extend({},d,c),this._defaults=d,this._init()}var c="Morphext",d={animation:"bounceIn",separator:",",speed:2e3,complete:a.noop};b.prototype={_init:function(){var b=this;this.phrases=[],this.element.addClass("morphext"),a.each(this.element.text().split(this.settings.separator),function(c,d){b.phrases.push(a.trim(d))}),this.index=-1,this.animate(),this.start()},animate:function(){this.index=++this.index%this.phrases.length,this.element[0].innerHTML='<span class="animated '+this.settings.animation+'">'+this.phrases[this.index]+"</span>",a.isFunction(this.settings.complete)&&this.settings.complete.call(this)},start:function(){var a=this;this._interval=setInterval(function(){a.animate()},this.settings.speed)},stop:function(){this._interval=clearInterval(this._interval)}},a.fn[c]=function(d){return this.each(function(){a.data(this,"plugin_"+c)||a.data(this,"plugin_"+c,new b(this,d))})}}(jQuery);
|
||||
Reference in New Issue
Block a user