Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript —-

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #38158
    JohnMotylJr
    Participant

    I have this:

    var length = $('h1').html().length;

    alert("h1 " + length);

    var _count = 0;

    $('h1').filter(function()
    {
    return $(this).text().length > _count;
    }).wrapInner(function() //need to target each char not all inside h1
    {
    return ''; // id or class doesnt matter
    }); //this.nodeValue should be the text but function isnt standalone

    The html output


    IM COLORFUL

    ​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​

    What i WANT to happen:


    I
    M
    C
    O
    L
    O
    R
    F
    U
    L

    Source: http://jsfiddle.net/john_motyl/aWC2w/1/

    #103303

    Lettering.js was the first thing I thought of too.

    #103504
    JohnMotylJr
    Participant

    @elneco, your title is quite awesome good sir :)

    I didnt realize there was a Lettering.JS but i will deff look at the documentation. I took a step back and realized the main code i was using had redundancies and recursive functions (I wanted so bad to use some :( ). But i am packing all of it into a plugin in which does what i explained but adds more methods and a shload of customizable stuff.

    Thanks for the responses btw, i have been hitting the jQuery forums pretty hard and waited until now (when i finally fixed it) to check my post. Again, thanks guys for the help.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.