title: How to add following classes to the elements 'li', using method 'map'
body: <p>Using method 'map' add following classes to the elements 'li' of each list 'ul': 1-st - 'sel', 2-nd - 'sel2',   3-rd - 'sel3', 4-th - 'sel'...  </p>
  
  <pre><code>$("li").map(function() {
  
        var replacement = $( "&lt;li&gt;" ). $( this ).get( 0 );
        if ( index === 0,4 ) {
            $( replacement ).addClass("sel");
        }
        if ( index === 1,4 ) {
            $( replacement ).addClass("sel1");
        }
        if ( index === 2,5 ) {
            $( replacement ).addClass("sel2");
        }
        return replacement;
    });
  </code></pre>