jschr / textillate

A jquery plugin for CSS3 text animations.
http://textillate.js.org
MIT License
3.66k stars 762 forks source link

Update to the plugin #99

Open mossad opened 8 years ago

mossad commented 8 years ago

hi, I updated your code to set initialDelay by html attribute this will reduce the jquery definitions don't need to write $(".tlt_1"), $(".tlt_2")....etc

The Markup will be -h2 textillate="3000" data-in-effect="rollIn" >Welcome !!!</h2-

//Javascript code

if(jQuery('[textillate]').length>0){
jQuery('[textillate]').each(function (i, el) {
    var current = jQuery(el), current_id = "textillate_" + current.attr("textillate");
    current.attr('id', "textillate_" + current.attr("textillate"));      
    jQuery("#" + current_id).textillate({
        initialDelay: jQuery(this).attr("textillate")
    });
});}
Tritek commented 6 years ago

@mossad Where i can paste it? After last line?