File: public/assets/typewriter/typewriter.min.js

Recommend this page to a friend!
  Classes of Aby Dahana  >  Aksara  >  public/assets/typewriter/typewriter.min.js  >  Download  
File: public/assets/typewriter/typewriter.min.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Aksara
A CodeIgniter based API and CRUD generator
Author: By
Last change: Initial commit
Initial commit
Date: 2 months ago
Size: 726 bytes
 

Contents

Class file image Download
/*
 * every jQuery plugin for "typewriter" effect totally sucked
   so I hacked something together.
   
   Then I got a lot of interview questions about when a good time
   to use javascript closures is, and I kept coming back to this
   example; so I generalized it into a proper jQuery plugin.
   Feedback appreciated.
*/
!function(e){e.fn.typewriter=function(t){var a={selector:this,extra_char:"",delay:100,trim:!1,callback:null};return t&&e.extend(a,t),function r(c){var t=e(a.selector[c]),n=t.text();a.trim&&(n=e.trim(n)),t.html("").show(),function t(e,l){e.html(n.substr(0,l)+a.extra_char),n.length>=l?setTimeout(function(){t(e,l+1)},a.delay):++c<a.selector.length?r(c):a.callback&&a.callback()}(t,0)}(0),this}}(jQuery);

For more information send a message to info at phpclasses dot org.