dimajt / textition

jQuery plugin for text transitions
http://dimajt.github.io/textition
19 stars 9 forks source link

Child element text color #2

Open lovely2017 opened 7 years ago

lovely2017 commented 7 years ago

Hi, I am trying to change the color of child element b tag inside the H2 tag, but on page load this plugin is removing that child element and it is not changing the color as well. Kindly let me know if this plugin support this feature or not.

daviestobialex commented 7 years ago

same here, I have the same issue but I was able to get a fix, though it does not give the same fix. Just Replace the CreateLetters function with this below

     `var createLetters = function() {
        var span = $(this);
        var text = span.html()// span.text();
        var code = '';          

        // for (var i = 0; i < text.length; i++) {
            // code += '<l>' + filter(text[i]) + '</l>';
            code += '<l>' + filter(text) + '</l>';
        // }        
        span.html(code);
    }`