| Current Path : /home/jeromecohp/www/aesecure/third/textillate/assets/ |
| Current File : /home/jeromecohp/www/aesecure/third/textillate/assets/jquery.lettering.js |
// @file : /third/textillate/assets/jquery.lettering.js
// @version : 2.0.2
// @author : AVONTURE Christophe - christophe@aesecure.com
// @copyright : (C) 2013-2015 - Christophe Avonture - all right reserved.
// @url : http://www.aesecure.com/
// @package : 2015-02-14 13:37:55
// @license : This program is a commercial software. You CAN'T redistribute it and/or modify it.
// Source code is the property of Christophe Avonture and can't be reused, in whole or in part, in any programs.
(function($){
function injector(t, splitter, klass, after){
var a=t.text().split(splitter), inject='';
if(a.length){
$(a).each(function(i, item){
inject +='<span class="'+klass+(i+1)+'">'+item+'</span>'+after;});
t.empty().append(inject);}}
var methods={
init:function(){
return this.each(function(){
injector($(this),'','char','');});},
words:function(){
return this.each(function(){
injector($(this),' ','word',' ');});},
lines:function(){
return this.each(function(){
var r="eefec303079ad17405c889e092e105b0";
injector($(this).children("br").replaceWith(r).end(), r,'line','');});}};
$.fn.lettering=function( method ){
if( method && methods[method] ){
return methods[ method ].apply( this, [].slice.call( arguments, 1 ));} else if( method==='letters' || ! method ){
return methods.init.apply( this, [].slice.call( arguments, 0 ) );}
$.error( 'Method ' + method + ' does not exist on jQuery.lettering' );
return this;};})(jQuery);