(function(jQuery) {
    
    jQuery.fn.typewriter = function() {
        this.each(function() {
            var jQueryele = jQuery(this), str = jQueryele.text(), progress = 0;
            jQueryele.text('');
            var timer = setInterval(function() {
                jQueryele.text(str.substring(0, progress++) + (progress & 1 ? '_' : ''));
                if (progress >= str.length) clearInterval(timer);
            }, 50);
        });
        return this;
    };
        
})(jQuery);
