Prepend Year to Top of Columns


/ Published in: jQuery
Save to your folder(s)

Grabs the third char in (li a) from first link and append to top of column.


Copy this code and paste it in your HTML
  1. $("ul.ul_wrap").each(function(i) {
  2. var str = $(this).find("li:first a").text();
  3. var result = str.charAt(2);
  4. $(this).prepend("<strong>"+ result + 0 +"</strong>");
  5. });

URL: http://snipplr.com/view/28918/group-elements-of-ten-lists-items-jquery/

Report this snippet


Comments


You need to login to view comments.