我试图用jQuery操纵html中的列表。对于第一次出现的新字母,我想插入带有字母的div。想象一下,ul列表中的文本按字母顺序排序。现在jQuery正在为每个a-tag添加一个div。我只想将div添加到a的第一个出现,然后是b,然后是c,依此类推...我只是一个设计师而不是程序员。任何帮助,将不胜感激。
<ul class="child-ul"><li>
<a href="/sv/varumarken/a2.html" id="Varum_78" title="A2">A2</a>
<a href="/sv/varumarken/abc-collection.html" id="Varum_159" title="ABC Collection">ABC Collection</a>
<a href="/sv/varumarken/ablo.html" id="Varum_102" title="Ablo">Ablo</a>
<a href="/sv/varumarken/inter.html" id="Varum_250" title="Inter">Inter</a>
<a href="/sv/varumarken/adea.html" id="Varum_140" title="Adea">Adea</a>
<a href="/sv/varumarken/adea-collection.html" id="Varum_64" title="Adea Collection">Adea Collection</a>
<a href="/sv/varumarken/mobelsnickarmastare.html" id="Varum_218" title="Möbelsnickarmästare">Möbelsnickarmästare</a>
<a href="/sv/varumarken/afroart.html" id="Varum_131" title="Afroart">Afroart</a>
<a href="/sv/varumarken/alessi.html" id="Varum_52" title="Alessi">Alessi</a>
<a href="/sv/varumarken/allinwood.html" id="Varum_163" title="Allinwood">Allinwood</a>
<a href="/sv/varumarken/offecct.html" id="Varum_226" title="Offecct">Offecct</a>
<a href="/sv/varumarken/art-fakt.html" id="Varum_156" title="Art & Fakt">Art & Fakt</a>
<a href="/sv/varumarken/artek.html" id="Varum_18" title="Artek">Artek</a>
<a href="/sv/varumarken/accademia.html" id="Varum_249" title="Accademia">Accademia</a>
<a href="/sv/varumarken/artwood.html" id="Varum_2" title="Artwood">Artwood</a>
<a href="/sv/varumarken/ascension-latorre.html" id="Varum_94" title="Ascension Latorre">Ascension Latorre</a>
<a href="/sv/varumarken/asplund.html" id="Varum_7" title="Asplund">Asplund</a>
<a href="/sv/varumarken/atelje-lyktan.html" id="Varum_152" title="Atelje Lyktan">Atelje Lyktan</a>
<a href="/sv/varumarken/bassetti.html" id="Varum_117" title="Bassetti">Bassetti</a>
<a href="/sv/varumarken/belid.html" id="Varum_68" title="Belid">Belid</a>
<a href="/sv/varumarken/affari.html" id="Varum_217" title="Affari">Affari</a>
<a href="/sv/varumarken/blomus.html" id="Varum_164" title="Blomus">Blomus</a>
<a href="/sv/varumarken/kardelen.html" id="Varum_177" title="Kardelen">Kardelen</a>
<a href="/sv/varumarken/bluelounge.html" id="Varum_133" title="Bluelounge">Bluelounge</a>
<a href="/sv/varumarken/bloomingville.html" id="Varum_175" title="Bloomingville">Bloomingville</a>
<a href="/sv/varumarken/tica.html" id="Varum_247" title="Tica">Tica</a>
<a href="/sv/varumarken/born-in-sweden.html" id="Varum_67" title="Born in Sweden">Born in Sweden</a>
<a href="/sv/varumarken/giron.html" id="Varum_200" title="Giron">Giron</a>
<a href="/sv/varumarken/bowell.html" id="Varum_107" title="Bowell">Bowell</a>
<a href="/sv/varumarken/bruka-design.html" id="Varum_137" title="Bruka design">Bruka design</a>
<a href="/sv/varumarken/dennys-home.html" id="Varum_191" title="Denny's Home">Denny's Home</a>
<a href="/sv/varumarken/bsweden.html" id="Varum_4" title="Bsweden">Bsweden</a>
<a href="/sv/varumarken/by-lassen.html" id="Varum_80" title="By Lassen">By Lassen</a>
<a href="/sv/varumarken/by-rydens.html" id="Varum_38" title="By Rydéns">By Rydéns</a>
<a href="/sv/varumarken/byarums-bruk.html" id="Varum_40" title="Byarums bruk">Byarums bruk</a>
<a href="/sv/varumarken/cablecup.html" id="Varum_155" title="CableCup">CableCup</a>
<a href="/sv/varumarken/canada-goose-home.html" id="Varum_56" title="Canada Goose Home">Canada Goose Home</a>
<a href="/sv/varumarken/carl-hansen.html" id="Varum_162" title="Carl Hansen">Carl Hansen</a>
<a href="/sv/varumarken/carl-hansen-son.html" id="Varum_66" title="Carl Hansen & Son">Carl Hansen & Son</a>
<a href="/sv/varumarken/carl-malmsten.html" id="Varum_71" title="Carl Malmsten">Carl Malmsten</a>
<a href="/sv/varumarken/ceannis.html" id="Varum_104" title="Ceannis">Ceannis</a>
<a href="/sv/varumarken/rotor-design.html" id="Varum_210" title="Rotor Design">Rotor Design</a>
<a href="/sv/varumarken/larssonunited.html" id="Varum_181" title="Larssonunited">Larssonunited</a>
<a href="/sv/varumarken/cinas.html" id="Varum_37" title="Cinas">Cinas</a>
<a href="/sv/varumarken/classic-collection.html" id="Varum_139" title="Classic Collection">Classic Collection</a>
<a href="/sv/varumarken/classic-garden.html" id="Varum_17" title="Classic Garden">Classic Garden</a>
<a href="/sv/varumarken/club-vintage-interiors.html" id="Varum_93" title="Club Vintage Interiors">Club Vintage Interiors</a>
<a href="/sv/varumarken/cobra-art.html" id="Varum_77" title="Cobra Art">Cobra Art</a>
<a href="/sv/varumarken/cozy-living.html" id="Varum_95" title="Cozy Living">Cozy Living</a>
<a href="/sv/varumarken/cuero-design.html" id="Varum_33" title="Cuero Design">Cuero Design</a>
<a href="/sv/varumarken/dan-form.html" id="Varum_99" title="Dan Form">Dan Form</a>
<a href="/sv/varumarken/david-design.html" id="Varum_63" title="David Design">David Design</a>
<a href="/sv/varumarken/david-trubridge.html" id="Varum_171" title="David Trubridge">David Trubridge</a>
<a href="/sv/varumarken/dbkd.html" id="Varum_168" title="DBKD">DBKD</a>
<a href="/sv/varumarken/sofia-ehrengren.html" id="Varum_229" title="Sofia Ehrengren">Sofia Ehrengren</a>
<a href="/sv/varumarken/sb-nord.html" id="Varum_186" title="SB Nord">SB Nord</a>
<a href="/sv/varumarken/marset.html" id="Varum_193" title="Marset">Marset</a>
<a href="/sv/varumarken/nemo-lighting.html" id="Varum_174" title="Nemo Lighting">Nemo Lighting</a>
<a href="/sv/varumarken/dennys-home.html" id="Varum_138" title="Denny´s Home">Denny´s Home</a>
<a href="/sv/varumarken/design-house.html" id="Varum_45" title="Design house">Design house</a>
<a href="/sv/varumarken/deco.html" id="Varum_184" title="Deco">Deco</a>
<a href="/sv/varumarken/diesel-with-foscarini.html" id="Varum_118" title="Diesel with Foscarini">Diesel with Foscarini</a>
<a href="/sv/varumarken/dixie.html" id="Varum_28" title="Dixie">Dixie</a>
<a href="/sv/varumarken/dualit.html" id="Varum_35" title="Dualit">Dualit</a>
<a href="/sv/varumarken/graut.html" id="Varum_204" title="Graut.">Graut.</a>
<a href="/sv/varumarken/edblad.html" id="Varum_43" title="Edblad">Edblad</a>
<a href="/sv/varumarken/eichholtz.html" id="Varum_91" title="Eichholtz">Eichholtz</a>
<a href="/sv/varumarken/ekens.html" id="Varum_48" title="Ekens">Ekens</a>
<a href="/sv/varumarken/elvang-denmark.html" id="Varum_166" title="Elvang Denmark">Elvang Denmark</a>
<a href="/sv/varumarken/emeco.html" id="Varum_12" title="Emeco">Emeco</a>
<a href="/sv/varumarken/svedholm-design.html" id="Varum_238" title="Svedholm Design">Svedholm Design</a>
<a href="/sv/varumarken/englesson.html" id="Varum_103" title="Englesson">Englesson</a>
<a href="/sv/varumarken/engmo-dun.html" id="Varum_79" title="Engmo Dun">Engmo Dun</a>
<a href="/sv/varumarken/forsberg-form.html" id="Varum_203" title="Forsberg Form">Forsberg Form</a>
<a href="/sv/varumarken/ethimo.html" id="Varum_167" title="Ethimo">Ethimo</a>
<a href="/sv/varumarken/eva-solo.html" id="Varum_11" title="Eva Solo">Eva Solo</a>
<a href="/sv/varumarken/hazen-kamp.html" id="Varum_192" title="Hazen Kamp">Hazen Kamp</a>
<a href="/sv/varumarken/fabula-living.html" id="Varum_14" title="Fabula Living">Fabula Living</a>
<a href="/sv/varumarken/falu-rodfarg.html" id="Varum_108" title="Falu Rödfärg">Falu Rödfärg</a>
<a href="/sv/varumarken/svenska-hemslojd.html" id="Varum_196" title="Svenska hemslöjd">Svenska hemslöjd</a>
<a href="/sv/varumarken/fatboy.html" id="Varum_146" title="Fatboy">Fatboy</a>
<a href="/sv/varumarken/fermob.html" id="Varum_16" title="Fermob">Fermob</a>
<a href="/sv/varumarken/fiam.html" id="Varum_73" title="Fiam">Fiam</a>
<a href="/sv/varumarken/flos.html" id="Varum_20" title="Flos">Flos</a>
<a href="/sv/varumarken/fogia.html" id="Varum_54" title="Fogia">Fogia</a>
<a href="/sv/varumarken/forms.html" id="Varum_60" title="Forms">Forms</a>
<a href="/sv/varumarken/asas-tomtebod.html" id="Varum_205" title="Åsas Tomtebod">Åsas Tomtebod</a>
<a href="/sv/varumarken/foscarini.html" id="Varum_57" title="Foscarini">Foscarini</a>
<a href="/sv/varumarken/frama.html" id="Varum_26" title="Frama">Frama</a>
<a href="/sv/varumarken/fredericia-furniture.html" id="Varum_170" title="Fredericia Furniture">Fredericia Furniture</a>
<a href="/sv/varumarken/fri-form.html" id="Varum_115" title="Fri Form">Fri Form</a>
<a href="/sv/varumarken/frost.html" id="Varum_157" title="Frost">Frost</a>
<a href="/sv/varumarken/joseph-joseph.html" id="Varum_235" title="Joseph Joseph">Joseph Joseph</a>
<a href="/sv/varumarken/gant-home.html" id="Varum_58" title="Gant Home">Gant Home</a>
<a href="/sv/varumarken/garden-glory.html" id="Varum_147" title="Garden Glory">Garden Glory</a>
<a href="/sv/varumarken/geneva.html" id="Varum_41" title="Geneva">Geneva</a>
<a href="/sv/varumarken/georg-jensen.html" id="Varum_55" title="Georg Jensen">Georg Jensen</a>
<a href="/sv/varumarken/givarps.html" id="Varum_96" title="Givarps">Givarps</a>
<a href="/sv/varumarken/osregn.html" id="Varum_206" title="Ösregn">Ösregn</a>
<a href="/sv/varumarken/riverdale.html" id="Varum_233" title="Riverdale">Riverdale</a>
<a href="/sv/varumarken/grythyttan-stalmobler.html" id="Varum_30" title="Grythyttan stålmöbler">Grythyttan stålmöbler</a>
<a href="/sv/varumarken/gubi.html" id="Varum_19" title="Gubi">Gubi</a>
<a href="/sv/varumarken/gubi-bestlite.html" id="Varum_121" title="Gubi (Bestlite)">Gubi (Bestlite)</a>
<a href="/sv/varumarken/orskov.html" id="Varum_199" title="Orskov">Orskov</a>
<a href="/sv/varumarken/garsnas.html" id="Varum_136" title="Gärsnäs">Gärsnäs</a>
<a href="/sv/varumarken/wave-music.html" id="Varum_185" title="Wave music">Wave music</a>
<a href="/sv/varumarken/haslev.html" id="Varum_153" title="Haslev">Haslev</a>
<a href="/sv/varumarken/fast-design.html" id="Varum_194" title="Fast Design">Fast Design</a>
<a href="/sv/varumarken/himla.html" id="Varum_86" title="Himla">Himla</a>
<a href="/sv/varumarken/hjertenhjerten-.html" id="Varum_148" title="Hjerten&Hjerten ">Hjerten&Hjerten </a>
<a href="/sv/varumarken/boknas.html" id="Varum_214" title="Boknäs">Boknäs</a>
<a href="/sv/varumarken/homeline.html" id="Varum_36" title="Homeline">Homeline</a>
<a href="/sv/varumarken/horreds.html" id="Varum_75" title="Horreds">Horreds</a>
<a href="/sv/varumarken/ht-collection.html" id="Varum_53" title="HT Collection">HT Collection</a>
<a href="/sv/varumarken/huuz.html" id="Varum_5" title="Huuz">Huuz</a>
<a href="/sv/varumarken/huuz-company.html" id="Varum_6" title="Huuz company">Huuz company</a>
<a href="/sv/varumarken/sia.html" id="Varum_180" title="Sia">Sia</a>
<a href="/sv/varumarken/vipp.html" id="Varum_251" title="Vipp">Vipp</a>
<a href="/sv/varumarken/ire-mobel.html" id="Varum_62" title="Ire Möbel">Ire Möbel</a>
<a href="/sv/varumarken/iris-hantverk.html" id="Varum_143" title="Iris hantverk">Iris hantverk</a>
<a href="/sv/varumarken/bleu-nature.html" id="Varum_216" title="Bleu nature">Bleu nature</a>
<a href="/sv/varumarken/jielde.html" id="Varum_142" title="Jieldé">Jieldé</a>
<a href="/sv/varumarken/tom-dixon.html" id="Varum_236" title="Tom Dixon">Tom Dixon</a>
<a href="/sv/varumarken/sudio.html" id="Varum_209" title="Sudio">Sudio</a>
<a href="/sv/varumarken/chhatwal-jonsson.html" id="Varum_179" title="Chhatwal & Jonsson">Chhatwal & Jonsson</a>
<a href="/sv/varumarken/karl-andersson-soner.html" id="Varum_61" title="Karl Andersson & Söner">Karl Andersson & Söner</a>
<a href="/sv/varumarken/karlskrona-lampfabrik.html" id="Varum_49" title="Karlskrona lampfabrik">Karlskrona lampfabrik</a>
<a href="/sv/varumarken/kateha.html" id="Varum_127" title="Kateha">Kateha</a>
<a href="/sv/varumarken/kay-bojesen.html" id="Varum_88" title="Kay Bojesen">Kay Bojesen</a>
<a href="/sv/varumarken/klippan-yllefabrik.html" id="Varum_128" title="Klippan Yllefabrik">Klippan Yllefabrik</a>
<a href="/sv/varumarken/klong.html" id="Varum_15" title="Klong">Klong</a>
<a href="/sv/varumarken/konsthantverk.html" id="Varum_24" title="Konsthantverk">Konsthantverk</a>
<a href="/sv/varumarken/korbo.html" id="Varum_112" title="Korbo">Korbo</a>
<a href="/sv/varumarken/kristensen-kristensen.html" id="Varum_76" title="Kristensen & Kristensen">Kristensen & Kristensen</a>
<a href="/sv/varumarken/nudeaudio.html" id="Varum_245" title="NudeAudio">NudeAudio</a>
<a href="/sv/varumarken/kallemo.html" id="Varum_69" title="Källemo">Källemo</a>
<a href="/sv/varumarken/la-bruket.html" id="Varum_81" title="L:a Bruket">L:a Bruket</a>
<a href="/sv/varumarken/nud.html" id="Varum_224" title="NUD">NUD</a>
<a href="/sv/varumarken/lammhults.html" id="Varum_89" title="Lammhults">Lammhults</a>
<a href="/sv/varumarken/lampe-gras.html" id="Varum_22" title="Lampe Gras">Lampe Gras</a>
<a href="/sv/varumarken/hanna-korvela.html" id="Varum_183" title="Hanna Korvela">Hanna Korvela</a>
<a href="/sv/varumarken/le-creuset.html" id="Varum_129" title="Le Creuset">Le Creuset</a>
<a href="/sv/varumarken/le-klint.html" id="Varum_13" title="Le Klint">Le Klint</a>
<a href="/sv/varumarken/lexington.html" id="Varum_72" title="Lexington">Lexington</a>
<a href="/sv/varumarken/lexington-urban-collective.html" id="Varum_105" title="Lexington Urban Collective">Lexington Urban Collective</a>
<a href="/sv/varumarken/lightyears.html" id="Varum_101" title="Lightyears">Lightyears</a>
<a href="/sv/varumarken/linie-design.html" id="Varum_34" title="Linie Design">Linie Design</a>
<a href="/sv/varumarken/louis-poulsen.html" id="Varum_31" title="Louis Poulsen">Louis Poulsen</a>
<a href="/sv/varumarken/louise-roe.html" id="Varum_165" title="Louise Roe">Louise Roe</a>
<a href="/sv/varumarken/luceplan.html" id="Varum_172" title="Luceplan">Luceplan</a>
<a href="/sv/varumarken/manzana.html" id="Varum_122" title="Manzana">Manzana</a>
<a href="/sv/varumarken/verpan.html" id="Varum_195" title="Verpan">Verpan</a>
<a href="/sv/varumarken/massproductions.html" id="Varum_51" title="Massproductions">Massproductions</a>
<a href="/sv/varumarken/schaffner.html" id="Varum_221" title="Schaffner">Schaffner</a>
<a href="/sv/varumarken/mateus.html" id="Varum_149" title="Mateus">Mateus</a>
<a href="/sv/varumarken/mavis.html" id="Varum_9" title="Mavis">Mavis</a>
<a href="/sv/varumarken/maze.html" id="Varum_87" title="Maze">Maze</a>
<a href="/sv/varumarken/massproduktion.html" id="Varum_220" title="Massproduktion">Massproduktion</a>
<a href="/sv/varumarken/menu.html" id="Varum_42" title="Menu">Menu</a>
<a href="/sv/varumarken/mikaela-willers.html" id="Varum_109" title="Mikaela Willers">Mikaela Willers</a>
<a href="/sv/varumarken/muubs.html" id="Varum_111" title="Muubs">Muubs</a>
<a href="/sv/varumarken/muuto.html" id="Varum_27" title="Muuto">Muuto</a>
<a href="/sv/varumarken/mbj-design.html" id="Varum_219" title="MBJ Design">MBJ Design</a>
<a href="/sv/varumarken/potteryjo.html" id="Varum_176" title="PotteryJo">PotteryJo</a>
<a href="/sv/varumarken/nonuform.html" id="Varum_65" title="Nonuform">Nonuform</a>
<a href="/sv/varumarken/nordal.html" id="Varum_130" title="Nordal">Nordal</a>
<a href="/sv/varumarken/normann-copenhagen.html" id="Varum_74" title="Normann Copenhagen">Normann Copenhagen</a>
<a href="/sv/varumarken/norr11.html" id="Varum_169" title="Norr11">Norr11</a>
<a href="/sv/varumarken/northern-lighting.html" id="Varum_32" title="Northern Lighting">Northern Lighting</a>
<a href="/sv/varumarken/ankarsrum.html" id="Varum_225" title="Ankarsrum">Ankarsrum</a>
<a href="/sv/varumarken/boknas-club-vintage-interiors-.html" id="Varum_246" title="Boknäs/Club Vintage Interiors ">Boknäs/Club Vintage Interiors </a>
<a href="/sv/varumarken/odd-molly.html" id="Varum_3" title="Odd Molly">Odd Molly</a>
<a href="/sv/varumarken/vm-carpet.html" id="Varum_227" title="VM-Carpet">VM-Carpet</a>
<a href="/sv/varumarken/oliver-furniture.html" id="Varum_114" title="Oliver Furniture">Oliver Furniture</a>
<a href="/sv/varumarken/oluce.html" id="Varum_141" title="Oluce">Oluce</a>
<a href="/sv/varumarken/essem-design.html" id="Varum_201" title="Essem Design">Essem Design</a>
<a href="/sv/varumarken/oscar-borgstrom.html" id="Varum_106" title="Oscar Borgström">Oscar Borgström</a>
<a href="/sv/varumarken/ox-denmarq.html" id="Varum_124" title="OX Denmarq">OX Denmarq</a>
<a href="/sv/varumarken/pandul.html" id="Varum_150" title="Pandul">Pandul</a>
<a href="/sv/varumarken/pappelina.html" id="Varum_47" title="Pappelina">Pappelina</a>
<a href="/sv/varumarken/pb-home.html" id="Varum_85" title="Pb Home">Pb Home</a>
<a href="/sv/varumarken/peugeot.html" id="Varum_135" title="Peugeot">Peugeot</a>
<a href="/sv/varumarken/pholc.html" id="Varum_119" title="Pholc">Pholc</a>
<a href="/sv/varumarken/graypants.html" id="Varum_232" title="Graypants">Graypants</a>
<a href="/sv/varumarken/pols-potten.html" id="Varum_151" title="Pols Potten">Pols Potten</a>
<a href="/sv/varumarken/staffan-hultgren-.html" id="Varum_240" title="Staffan Hultgren ">Staffan Hultgren </a>
<a href="/sv/varumarken/indoor-outdoor-scandinavia.html" id="Varum_178" title="Indoor Outdoor Scandinavia">Indoor Outdoor Scandinavia</a>
<a href="/sv/varumarken/stikkan-design.html" id="Varum_243" title="Stikkan Design">Stikkan Design</a>
<a href="/sv/varumarken/galleri-pascale.html" id="Varum_234" title="Galleri Pascale">Galleri Pascale</a>
<a href="/sv/varumarken/hkliving.html" id="Varum_212" title="HKLiving">HKLiving</a>
<a href="/sv/varumarken/rubn.html" id="Varum_92" title="RUBN">RUBN</a>
<a href="/sv/varumarken/ruth-joanna.html" id="Varum_125" title="Ruth & Joanna">Ruth & Joanna</a>
<a href="/sv/varumarken/roshults.html" id="Varum_82" title="Röshults">Röshults</a>
<a href="/sv/varumarken/santa-cole.html" id="Varum_160" title="Santa & Cole">Santa & Cole</a>
<a href="/sv/varumarken/savon-de-marseille.html" id="Varum_134" title="Savon de Marseille">Savon de Marseille</a>
<a href="/sv/varumarken/shepherd.html" id="Varum_188" title="Shepherd">Shepherd</a>
<a href="/sv/varumarken/wavemusic.html" id="Varum_222" title="Wavemusic">Wavemusic</a>
<a href="/sv/varumarken/scherlin.html" id="Varum_8" title="Scherlin">Scherlin</a>
<a href="/sv/varumarken/secrid.html" id="Varum_158" title="Secrid">Secrid</a>
<a href="/sv/varumarken/secto-design.html" id="Varum_98" title="Secto Design">Secto Design</a>
<a href="/sv/varumarken/fabula.html" id="Varum_190" title="Fabula">Fabula</a>
<a href="/sv/varumarken/designers-eye.html" id="Varum_182" title="Designers eye">Designers eye</a>
<a href="/sv/varumarken/sika-design.html" id="Varum_46" title="Sika Design">Sika Design</a>
<a href="/sv/varumarken/skagerak.html" id="Varum_39" title="Skagerak">Skagerak</a>
<a href="/sv/varumarken/skandilock.html" id="Varum_154" title="Skandilock">Skandilock</a>
<a href="/sv/varumarken/skultuna.html" id="Varum_145" title="Skultuna">Skultuna</a>
<a href="/sv/varumarken/bruno-mathsson.html" id="Varum_189" title="Bruno Mathsson">Bruno Mathsson</a>
<a href="/sv/varumarken/smd-design.html" id="Varum_25" title="SMD Design">SMD Design</a>
<a href="/sv/varumarken/thomas-malmberg-design.html" id="Varum_230" title="Thomas Malmberg Design">Thomas Malmberg Design</a>
<a href="/sv/varumarken/dyberg-larsen.html" id="Varum_202" title="Dyberg Larsen">Dyberg Larsen</a>
<a href="/sv/varumarken/spode.html" id="Varum_132" title="Spode">Spode</a>
<a href="/sv/varumarken/1.html" id="Varum_242" title="1">1</a>
<a href="/sv/varumarken/spring.html" id="Varum_241" title="Spring">Spring</a>
<a href="/sv/varumarken/star-trading.html" id="Varum_161" title="Star Trading">Star Trading</a>
<a href="/sv/varumarken/stelton.html" id="Varum_90" title="Stelton">Stelton</a>
<a href="/sv/varumarken/sthal.html" id="Varum_84" title="Sthål">Sthål</a>
<a href="/sv/varumarken/kristensen-och-kristensen.html" id="Varum_244" title="Kristensen och Kristensen">Kristensen och Kristensen</a>
<a href="/sv/varumarken/stockamollan.html" id="Varum_59" title="Stockamöllan">Stockamöllan</a>
<a href="/sv/varumarken/string.html" id="Varum_97" title="String">String</a>
<a href="/sv/varumarken/studio-eero-aarnio.html" id="Varum_144" title="Studio Eero Aarnio">Studio Eero Aarnio</a>
<a href="/sv/varumarken/tre-sekel.html" id="Varum_211" title="Tre Sekel">Tre Sekel</a>
<a href="/sv/varumarken/pomstockholm.html" id="Varum_239" title="Pomstockholm">Pomstockholm</a>
<a href="/sv/varumarken/bosign.html" id="Varum_198" title="Bosign">Bosign</a>
<a href="/sv/varumarken/irislight.html" id="Varum_215" title="IrisLight">IrisLight</a>
<a href="/sv/varumarken/the-case-factory.html" id="Varum_173" title="The Case Factory">The Case Factory</a>
<a href="/sv/varumarken/thg.html" id="Varum_120" title="THG">THG</a>
<a href="/sv/varumarken/pip.html" id="Varum_231" title="Pip">Pip</a>
<a href="/sv/varumarken/artemide.html" id="Varum_248" title="Artemide">Artemide</a>
<a href="/sv/varumarken/tierlantijn-lighting.html" id="Varum_110" title="Tierlantijn Lighting">Tierlantijn Lighting</a>
<a href="/sv/varumarken/tivoli-audio.html" id="Varum_50" title="Tivoli Audio">Tivoli Audio</a>
<a href="/sv/varumarken/tolix.html" id="Varum_29" title="Tolix">Tolix</a>
<a href="/sv/varumarken/emu.html" id="Varum_237" title="Emu">Emu</a>
<a href="/sv/varumarken/tove-adman.html" id="Varum_123" title="Tove Adman">Tove Adman</a>
<a href="/sv/varumarken/tekna.html" id="Varum_213" title="Tekna">Tekna</a>
<a href="/sv/varumarken/guteform.html" id="Varum_197" title="Guteform">Guteform</a>
<a href="/sv/varumarken/vifa.html" id="Varum_83" title="Vifa">Vifa</a>
<a href="/sv/varumarken/friends-founders.html" id="Varum_252" title="Friends & Founders">Friends & Founders</a>
<a href="/sv/varumarken/de-nord.html" id="Varum_228" title="De Nord">De Nord</a>
<a href="/sv/varumarken/voice.html" id="Varum_23" title="Voice">Voice</a>
<a href="/sv/varumarken/voluspa.html" id="Varum_70" title="Voluspa">Voluspa</a>
<a href="/sv/varumarken/watt-veke.html" id="Varum_44" title="Watt & Veke">Watt & Veke</a>
<a href="/sv/varumarken/smak-design.html" id="Varum_187" title="SMAK Design">SMAK Design</a>
<a href="/sv/varumarken/lafuma.html" id="Varum_223" title="Lafuma">Lafuma</a>
<a href="/sv/varumarken/wildlife-garden.html" id="Varum_126" title="Wildlife Garden">Wildlife Garden</a>
<a href="/sv/varumarken/wastberg.html" id="Varum_116" title="Wästberg">Wästberg</a>
<a href="/sv/varumarken/zero.html" id="Varum_113" title="Zero">Zero</a>
<a href="/sv/varumarken/zweed.html" id="Varum_10" title="Zweed">Zweed</a>
<a href="/sv/varumarken/kallholmen.html" id="Varum_207" title="Kallholmen">Kallholmen</a>
<a href="/sv/varumarken/orsjo-belysning.html" id="Varum_21" title="Örsjö Belysning">Örsjö Belysning</a>
<a href="/sv/varumarken/cell.html" id="Varum_208" title="Cell">Cell</a>
<a href="/sv/varumarken/ovrigt.html" id="Varum_100" title="Övrigt">Övrigt</a>
</li>
</ul>
和jQuery
var letters = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "x", "y", "z", "å", "ä", "ö"];
llen = letters.length;
for (i = 0; i < llen; i++) {
jQuery('.varumarken .child-ul li a').each(function(){
if(jQuery(this).text().charAt(0).toLowerCase() == letters[i]){
var html = '<div class="letter">' + letters[i] + '</div>';
jQuery(html).insertBefore(jQuery(this));
return;
}
});
更新:我希望能够将所有以相同字母开头的标签放在自己的li中。我该怎么做呢?已经尝试了一段时间。
答案 0 :(得分:1)
如果您想在设置一次字母后突破.each()
,请使用return false;
,如下例所示。
我还提供了一个有排序的工作示例。
$(document).ready(function() {
var letters = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "x", "y", "z", "å", "ä", "ö"];
var llen = letters.length;
for (i = 0; i < llen; i++) {
jQuery('.child-ul li a').each(function() {
if (jQuery(this).text().charAt(0).toLowerCase() == letters[i]) {
var html = '<div class="letter">' + letters[i] + '</div>';
jQuery(html).insertBefore(jQuery(this));
return false;
}
});
}
})
$(function() {
$.fn.sortList = function() {
var mylist = $(this);
var listitems = $('a', mylist).get();
listitems.sort(function(a, b) {
var compA = $(a).text().toUpperCase();
var compB = $(b).text().toUpperCase();
return (compA < compB) ? -1 : 1;
});
$.each(listitems, function(i, itm) {
mylist.find("li").append(itm);
});
}
$("ul.child-ul").sortList();
});
$(document).ready(function() {
var letters = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "x", "y", "z", "å", "ä", "ö"];
var llen = letters.length;
for (i = 0; i < llen; i++) {
jQuery('.child-ul li a').each(function() {
if (jQuery(this).text().charAt(0).toLowerCase() == letters[i]) {
var html = '<div class="letter">' + letters[i] + '</div>';
jQuery(html).insertBefore(jQuery(this));
return false;
}
});
}
})
a{
display: block}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<ul class="child-ul">
<li>
<a href="/sv/varumarken/a2.html" id="Varum_78" title="A2">A2</a>
<a href="/sv/varumarken/abc-collection.html" id="Varum_159" title="ABC Collection">ABC Collection</a>
<a href="/sv/varumarken/ablo.html" id="Varum_102" title="Ablo">Ablo</a>
<a href="/sv/varumarken/inter.html" id="Varum_250" title="Inter">Inter</a>
<a href="/sv/varumarken/adea.html" id="Varum_140" title="Adea">Adea</a>
<a href="/sv/varumarken/adea-collection.html" id="Varum_64" title="Adea Collection">Adea Collection</a>
<a href="/sv/varumarken/mobelsnickarmastare.html" id="Varum_218" title="Möbelsnickarmästare">Möbelsnickarmästare</a>
<a href="/sv/varumarken/afroart.html" id="Varum_131" title="Afroart">Afroart</a>
<a href="/sv/varumarken/alessi.html" id="Varum_52" title="Alessi">Alessi</a>
<a href="/sv/varumarken/allinwood.html" id="Varum_163" title="Allinwood">Allinwood</a>
<a href="/sv/varumarken/offecct.html" id="Varum_226" title="Offecct">Offecct</a>
<a href="/sv/varumarken/art-fakt.html" id="Varum_156" title="Art & Fakt">Art & Fakt</a>
<a href="/sv/varumarken/artek.html" id="Varum_18" title="Artek">Artek</a>
<a href="/sv/varumarken/accademia.html" id="Varum_249" title="Accademia">Accademia</a>
<a href="/sv/varumarken/artwood.html" id="Varum_2" title="Artwood">Artwood</a>
<a href="/sv/varumarken/ascension-latorre.html" id="Varum_94" title="Ascension Latorre">Ascension Latorre</a>
<a href="/sv/varumarken/asplund.html" id="Varum_7" title="Asplund">Asplund</a>
<a href="/sv/varumarken/atelje-lyktan.html" id="Varum_152" title="Atelje Lyktan">Atelje Lyktan</a>
<a href="/sv/varumarken/bassetti.html" id="Varum_117" title="Bassetti">Bassetti</a>
<a href="/sv/varumarken/belid.html" id="Varum_68" title="Belid">Belid</a>
<a href="/sv/varumarken/affari.html" id="Varum_217" title="Affari">Affari</a>
<a href="/sv/varumarken/blomus.html" id="Varum_164" title="Blomus">Blomus</a>
<a href="/sv/varumarken/kardelen.html" id="Varum_177" title="Kardelen">Kardelen</a>
<a href="/sv/varumarken/bluelounge.html" id="Varum_133" title="Bluelounge">Bluelounge</a>
<a href="/sv/varumarken/bloomingville.html" id="Varum_175" title="Bloomingville">Bloomingville</a>
<a href="/sv/varumarken/tica.html" id="Varum_247" title="Tica">Tica</a>
<a href="/sv/varumarken/born-in-sweden.html" id="Varum_67" title="Born in Sweden">Born in Sweden</a>
<a href="/sv/varumarken/giron.html" id="Varum_200" title="Giron">Giron</a>
<a href="/sv/varumarken/bowell.html" id="Varum_107" title="Bowell">Bowell</a>
<a href="/sv/varumarken/bruka-design.html" id="Varum_137" title="Bruka design">Bruka design</a>
<a href="/sv/varumarken/dennys-home.html" id="Varum_191" title="Denny's Home">Denny's Home</a>
<a href="/sv/varumarken/bsweden.html" id="Varum_4" title="Bsweden">Bsweden</a>
<a href="/sv/varumarken/by-lassen.html" id="Varum_80" title="By Lassen">By Lassen</a>
<a href="/sv/varumarken/by-rydens.html" id="Varum_38" title="By Rydéns">By Rydéns</a>
<a href="/sv/varumarken/byarums-bruk.html" id="Varum_40" title="Byarums bruk">Byarums bruk</a>
<a href="/sv/varumarken/cablecup.html" id="Varum_155" title="CableCup">CableCup</a>
<a href="/sv/varumarken/canada-goose-home.html" id="Varum_56" title="Canada Goose Home">Canada Goose Home</a>
<a href="/sv/varumarken/carl-hansen.html" id="Varum_162" title="Carl Hansen">Carl Hansen</a>
<a href="/sv/varumarken/carl-hansen-son.html" id="Varum_66" title="Carl Hansen & Son">Carl Hansen & Son</a>
<a href="/sv/varumarken/carl-malmsten.html" id="Varum_71" title="Carl Malmsten">Carl Malmsten</a>
<a href="/sv/varumarken/ceannis.html" id="Varum_104" title="Ceannis">Ceannis</a>
<a href="/sv/varumarken/rotor-design.html" id="Varum_210" title="Rotor Design">Rotor Design</a>
<a href="/sv/varumarken/larssonunited.html" id="Varum_181" title="Larssonunited">Larssonunited</a>
<a href="/sv/varumarken/cinas.html" id="Varum_37" title="Cinas">Cinas</a>
<a href="/sv/varumarken/classic-collection.html" id="Varum_139" title="Classic Collection">Classic Collection</a>
<a href="/sv/varumarken/classic-garden.html" id="Varum_17" title="Classic Garden">Classic Garden</a>
<a href="/sv/varumarken/club-vintage-interiors.html" id="Varum_93" title="Club Vintage Interiors">Club Vintage Interiors</a>
<a href="/sv/varumarken/cobra-art.html" id="Varum_77" title="Cobra Art">Cobra Art</a>
<a href="/sv/varumarken/cozy-living.html" id="Varum_95" title="Cozy Living">Cozy Living</a>
<a href="/sv/varumarken/cuero-design.html" id="Varum_33" title="Cuero Design">Cuero Design</a>
<a href="/sv/varumarken/dan-form.html" id="Varum_99" title="Dan Form">Dan Form</a>
<a href="/sv/varumarken/david-design.html" id="Varum_63" title="David Design">David Design</a>
<a href="/sv/varumarken/david-trubridge.html" id="Varum_171" title="David Trubridge">David Trubridge</a>
<a href="/sv/varumarken/dbkd.html" id="Varum_168" title="DBKD">DBKD</a>
<a href="/sv/varumarken/sofia-ehrengren.html" id="Varum_229" title="Sofia Ehrengren">Sofia Ehrengren</a>
<a href="/sv/varumarken/sb-nord.html" id="Varum_186" title="SB Nord">SB Nord</a>
<a href="/sv/varumarken/marset.html" id="Varum_193" title="Marset">Marset</a>
<a href="/sv/varumarken/nemo-lighting.html" id="Varum_174" title="Nemo Lighting">Nemo Lighting</a>
<a href="/sv/varumarken/dennys-home.html" id="Varum_138" title="Denny´s Home">Denny´s Home</a>
<a href="/sv/varumarken/design-house.html" id="Varum_45" title="Design house">Design house</a>
<a href="/sv/varumarken/deco.html" id="Varum_184" title="Deco">Deco</a>
<a href="/sv/varumarken/diesel-with-foscarini.html" id="Varum_118" title="Diesel with Foscarini">Diesel with Foscarini</a>
<a href="/sv/varumarken/dixie.html" id="Varum_28" title="Dixie">Dixie</a>
<a href="/sv/varumarken/dualit.html" id="Varum_35" title="Dualit">Dualit</a>
<a href="/sv/varumarken/graut.html" id="Varum_204" title="Graut.">Graut.</a>
<a href="/sv/varumarken/edblad.html" id="Varum_43" title="Edblad">Edblad</a>
<a href="/sv/varumarken/eichholtz.html" id="Varum_91" title="Eichholtz">Eichholtz</a>
<a href="/sv/varumarken/ekens.html" id="Varum_48" title="Ekens">Ekens</a>
<a href="/sv/varumarken/elvang-denmark.html" id="Varum_166" title="Elvang Denmark">Elvang Denmark</a>
<a href="/sv/varumarken/emeco.html" id="Varum_12" title="Emeco">Emeco</a>
<a href="/sv/varumarken/svedholm-design.html" id="Varum_238" title="Svedholm Design">Svedholm Design</a>
<a href="/sv/varumarken/englesson.html" id="Varum_103" title="Englesson">Englesson</a>
<a href="/sv/varumarken/engmo-dun.html" id="Varum_79" title="Engmo Dun">Engmo Dun</a>
<a href="/sv/varumarken/forsberg-form.html" id="Varum_203" title="Forsberg Form">Forsberg Form</a>
<a href="/sv/varumarken/ethimo.html" id="Varum_167" title="Ethimo">Ethimo</a>
<a href="/sv/varumarken/eva-solo.html" id="Varum_11" title="Eva Solo">Eva Solo</a>
<a href="/sv/varumarken/hazen-kamp.html" id="Varum_192" title="Hazen Kamp">Hazen Kamp</a>
<a href="/sv/varumarken/fabula-living.html" id="Varum_14" title="Fabula Living">Fabula Living</a>
<a href="/sv/varumarken/falu-rodfarg.html" id="Varum_108" title="Falu Rödfärg">Falu Rödfärg</a>
<a href="/sv/varumarken/svenska-hemslojd.html" id="Varum_196" title="Svenska hemslöjd">Svenska hemslöjd</a>
<a href="/sv/varumarken/fatboy.html" id="Varum_146" title="Fatboy">Fatboy</a>
<a href="/sv/varumarken/fermob.html" id="Varum_16" title="Fermob">Fermob</a>
<a href="/sv/varumarken/fiam.html" id="Varum_73" title="Fiam">Fiam</a>
<a href="/sv/varumarken/flos.html" id="Varum_20" title="Flos">Flos</a>
<a href="/sv/varumarken/fogia.html" id="Varum_54" title="Fogia">Fogia</a>
<a href="/sv/varumarken/forms.html" id="Varum_60" title="Forms">Forms</a>
<a href="/sv/varumarken/asas-tomtebod.html" id="Varum_205" title="Åsas Tomtebod">Åsas Tomtebod</a>
<a href="/sv/varumarken/foscarini.html" id="Varum_57" title="Foscarini">Foscarini</a>
<a href="/sv/varumarken/frama.html" id="Varum_26" title="Frama">Frama</a>
<a href="/sv/varumarken/fredericia-furniture.html" id="Varum_170" title="Fredericia Furniture">Fredericia Furniture</a>
<a href="/sv/varumarken/fri-form.html" id="Varum_115" title="Fri Form">Fri Form</a>
<a href="/sv/varumarken/frost.html" id="Varum_157" title="Frost">Frost</a>
<a href="/sv/varumarken/joseph-joseph.html" id="Varum_235" title="Joseph Joseph">Joseph Joseph</a>
<a href="/sv/varumarken/gant-home.html" id="Varum_58" title="Gant Home">Gant Home</a>
<a href="/sv/varumarken/garden-glory.html" id="Varum_147" title="Garden Glory">Garden Glory</a>
<a href="/sv/varumarken/geneva.html" id="Varum_41" title="Geneva">Geneva</a>
<a href="/sv/varumarken/georg-jensen.html" id="Varum_55" title="Georg Jensen">Georg Jensen</a>
<a href="/sv/varumarken/givarps.html" id="Varum_96" title="Givarps">Givarps</a>
<a href="/sv/varumarken/osregn.html" id="Varum_206" title="Ösregn">Ösregn</a>
<a href="/sv/varumarken/riverdale.html" id="Varum_233" title="Riverdale">Riverdale</a>
<a href="/sv/varumarken/grythyttan-stalmobler.html" id="Varum_30" title="Grythyttan stålmöbler">Grythyttan stålmöbler</a>
<a href="/sv/varumarken/gubi.html" id="Varum_19" title="Gubi">Gubi</a>
<a href="/sv/varumarken/gubi-bestlite.html" id="Varum_121" title="Gubi (Bestlite)">Gubi (Bestlite)</a>
<a href="/sv/varumarken/orskov.html" id="Varum_199" title="Orskov">Orskov</a>
<a href="/sv/varumarken/garsnas.html" id="Varum_136" title="Gärsnäs">Gärsnäs</a>
<a href="/sv/varumarken/wave-music.html" id="Varum_185" title="Wave music">Wave music</a>
<a href="/sv/varumarken/haslev.html" id="Varum_153" title="Haslev">Haslev</a>
<a href="/sv/varumarken/fast-design.html" id="Varum_194" title="Fast Design">Fast Design</a>
<a href="/sv/varumarken/himla.html" id="Varum_86" title="Himla">Himla</a>
<a href="/sv/varumarken/hjertenhjerten-.html" id="Varum_148" title="Hjerten&Hjerten ">Hjerten&Hjerten </a>
<a href="/sv/varumarken/boknas.html" id="Varum_214" title="Boknäs">Boknäs</a>
<a href="/sv/varumarken/homeline.html" id="Varum_36" title="Homeline">Homeline</a>
<a href="/sv/varumarken/horreds.html" id="Varum_75" title="Horreds">Horreds</a>
<a href="/sv/varumarken/ht-collection.html" id="Varum_53" title="HT Collection">HT Collection</a>
<a href="/sv/varumarken/huuz.html" id="Varum_5" title="Huuz">Huuz</a>
<a href="/sv/varumarken/huuz-company.html" id="Varum_6" title="Huuz company">Huuz company</a>
<a href="/sv/varumarken/sia.html" id="Varum_180" title="Sia">Sia</a>
<a href="/sv/varumarken/vipp.html" id="Varum_251" title="Vipp">Vipp</a>
<a href="/sv/varumarken/ire-mobel.html" id="Varum_62" title="Ire Möbel">Ire Möbel</a>
<a href="/sv/varumarken/iris-hantverk.html" id="Varum_143" title="Iris hantverk">Iris hantverk</a>
<a href="/sv/varumarken/bleu-nature.html" id="Varum_216" title="Bleu nature">Bleu nature</a>
<a href="/sv/varumarken/jielde.html" id="Varum_142" title="Jieldé">Jieldé</a>
<a href="/sv/varumarken/tom-dixon.html" id="Varum_236" title="Tom Dixon">Tom Dixon</a>
<a href="/sv/varumarken/sudio.html" id="Varum_209" title="Sudio">Sudio</a>
<a href="/sv/varumarken/chhatwal-jonsson.html" id="Varum_179" title="Chhatwal & Jonsson">Chhatwal & Jonsson</a>
<a href="/sv/varumarken/karl-andersson-soner.html" id="Varum_61" title="Karl Andersson & Söner">Karl Andersson & Söner</a>
<a href="/sv/varumarken/karlskrona-lampfabrik.html" id="Varum_49" title="Karlskrona lampfabrik">Karlskrona lampfabrik</a>
<a href="/sv/varumarken/kateha.html" id="Varum_127" title="Kateha">Kateha</a>
<a href="/sv/varumarken/kay-bojesen.html" id="Varum_88" title="Kay Bojesen">Kay Bojesen</a>
<a href="/sv/varumarken/klippan-yllefabrik.html" id="Varum_128" title="Klippan Yllefabrik">Klippan Yllefabrik</a>
<a href="/sv/varumarken/klong.html" id="Varum_15" title="Klong">Klong</a>
<a href="/sv/varumarken/konsthantverk.html" id="Varum_24" title="Konsthantverk">Konsthantverk</a>
<a href="/sv/varumarken/korbo.html" id="Varum_112" title="Korbo">Korbo</a>
<a href="/sv/varumarken/kristensen-kristensen.html" id="Varum_76" title="Kristensen & Kristensen">Kristensen & Kristensen</a>
<a href="/sv/varumarken/nudeaudio.html" id="Varum_245" title="NudeAudio">NudeAudio</a>
<a href="/sv/varumarken/kallemo.html" id="Varum_69" title="Källemo">Källemo</a>
<a href="/sv/varumarken/la-bruket.html" id="Varum_81" title="L:a Bruket">L:a Bruket</a>
<a href="/sv/varumarken/nud.html" id="Varum_224" title="NUD">NUD</a>
<a href="/sv/varumarken/lammhults.html" id="Varum_89" title="Lammhults">Lammhults</a>
<a href="/sv/varumarken/lampe-gras.html" id="Varum_22" title="Lampe Gras">Lampe Gras</a>
<a href="/sv/varumarken/hanna-korvela.html" id="Varum_183" title="Hanna Korvela">Hanna Korvela</a>
<a href="/sv/varumarken/le-creuset.html" id="Varum_129" title="Le Creuset">Le Creuset</a>
<a href="/sv/varumarken/le-klint.html" id="Varum_13" title="Le Klint">Le Klint</a>
<a href="/sv/varumarken/lexington.html" id="Varum_72" title="Lexington">Lexington</a>
<a href="/sv/varumarken/lexington-urban-collective.html" id="Varum_105" title="Lexington Urban Collective">Lexington Urban Collective</a>
<a href="/sv/varumarken/lightyears.html" id="Varum_101" title="Lightyears">Lightyears</a>
<a href="/sv/varumarken/linie-design.html" id="Varum_34" title="Linie Design">Linie Design</a>
<a href="/sv/varumarken/louis-poulsen.html" id="Varum_31" title="Louis Poulsen">Louis Poulsen</a>
<a href="/sv/varumarken/louise-roe.html" id="Varum_165" title="Louise Roe">Louise Roe</a>
<a href="/sv/varumarken/luceplan.html" id="Varum_172" title="Luceplan">Luceplan</a>
<a href="/sv/varumarken/manzana.html" id="Varum_122" title="Manzana">Manzana</a>
<a href="/sv/varumarken/verpan.html" id="Varum_195" title="Verpan">Verpan</a>
<a href="/sv/varumarken/massproductions.html" id="Varum_51" title="Massproductions">Massproductions</a>
<a href="/sv/varumarken/schaffner.html" id="Varum_221" title="Schaffner">Schaffner</a>
<a href="/sv/varumarken/mateus.html" id="Varum_149" title="Mateus">Mateus</a>
<a href="/sv/varumarken/mavis.html" id="Varum_9" title="Mavis">Mavis</a>
<a href="/sv/varumarken/maze.html" id="Varum_87" title="Maze">Maze</a>
<a href="/sv/varumarken/massproduktion.html" id="Varum_220" title="Massproduktion">Massproduktion</a>
<a href="/sv/varumarken/menu.html" id="Varum_42" title="Menu">Menu</a>
<a href="/sv/varumarken/mikaela-willers.html" id="Varum_109" title="Mikaela Willers">Mikaela Willers</a>
<a href="/sv/varumarken/muubs.html" id="Varum_111" title="Muubs">Muubs</a>
<a href="/sv/varumarken/muuto.html" id="Varum_27" title="Muuto">Muuto</a>
<a href="/sv/varumarken/mbj-design.html" id="Varum_219" title="MBJ Design">MBJ Design</a>
<a href="/sv/varumarken/potteryjo.html" id="Varum_176" title="PotteryJo">PotteryJo</a>
<a href="/sv/varumarken/nonuform.html" id="Varum_65" title="Nonuform">Nonuform</a>
<a href="/sv/varumarken/nordal.html" id="Varum_130" title="Nordal">Nordal</a>
<a href="/sv/varumarken/normann-copenhagen.html" id="Varum_74" title="Normann Copenhagen">Normann Copenhagen</a>
<a href="/sv/varumarken/norr11.html" id="Varum_169" title="Norr11">Norr11</a>
<a href="/sv/varumarken/northern-lighting.html" id="Varum_32" title="Northern Lighting">Northern Lighting</a>
<a href="/sv/varumarken/ankarsrum.html" id="Varum_225" title="Ankarsrum">Ankarsrum</a>
<a href="/sv/varumarken/boknas-club-vintage-interiors-.html" id="Varum_246" title="Boknäs/Club Vintage Interiors ">Boknäs/Club Vintage Interiors </a>
<a href="/sv/varumarken/odd-molly.html" id="Varum_3" title="Odd Molly">Odd Molly</a>
<a href="/sv/varumarken/vm-carpet.html" id="Varum_227" title="VM-Carpet">VM-Carpet</a>
<a href="/sv/varumarken/oliver-furniture.html" id="Varum_114" title="Oliver Furniture">Oliver Furniture</a>
<a href="/sv/varumarken/oluce.html" id="Varum_141" title="Oluce">Oluce</a>
<a href="/sv/varumarken/essem-design.html" id="Varum_201" title="Essem Design">Essem Design</a>
<a href="/sv/varumarken/oscar-borgstrom.html" id="Varum_106" title="Oscar Borgström">Oscar Borgström</a>
<a href="/sv/varumarken/ox-denmarq.html" id="Varum_124" title="OX Denmarq">OX Denmarq</a>
<a href="/sv/varumarken/pandul.html" id="Varum_150" title="Pandul">Pandul</a>
<a href="/sv/varumarken/pappelina.html" id="Varum_47" title="Pappelina">Pappelina</a>
<a href="/sv/varumarken/pb-home.html" id="Varum_85" title="Pb Home">Pb Home</a>
<a href="/sv/varumarken/peugeot.html" id="Varum_135" title="Peugeot">Peugeot</a>
<a href="/sv/varumarken/pholc.html" id="Varum_119" title="Pholc">Pholc</a>
<a href="/sv/varumarken/graypants.html" id="Varum_232" title="Graypants">Graypants</a>
<a href="/sv/varumarken/pols-potten.html" id="Varum_151" title="Pols Potten">Pols Potten</a>
<a href="/sv/varumarken/staffan-hultgren-.html" id="Varum_240" title="Staffan Hultgren ">Staffan Hultgren </a>
<a href="/sv/varumarken/indoor-outdoor-scandinavia.html" id="Varum_178" title="Indoor Outdoor Scandinavia">Indoor Outdoor Scandinavia</a>
<a href="/sv/varumarken/stikkan-design.html" id="Varum_243" title="Stikkan Design">Stikkan Design</a>
<a href="/sv/varumarken/galleri-pascale.html" id="Varum_234" title="Galleri Pascale">Galleri Pascale</a>
<a href="/sv/varumarken/hkliving.html" id="Varum_212" title="HKLiving">HKLiving</a>
<a href="/sv/varumarken/rubn.html" id="Varum_92" title="RUBN">RUBN</a>
<a href="/sv/varumarken/ruth-joanna.html" id="Varum_125" title="Ruth & Joanna">Ruth & Joanna</a>
<a href="/sv/varumarken/roshults.html" id="Varum_82" title="Röshults">Röshults</a>
<a href="/sv/varumarken/santa-cole.html" id="Varum_160" title="Santa & Cole">Santa & Cole</a>
<a href="/sv/varumarken/savon-de-marseille.html" id="Varum_134" title="Savon de Marseille">Savon de Marseille</a>
<a href="/sv/varumarken/shepherd.html" id="Varum_188" title="Shepherd">Shepherd</a>
<a href="/sv/varumarken/wavemusic.html" id="Varum_222" title="Wavemusic">Wavemusic</a>
<a href="/sv/varumarken/scherlin.html" id="Varum_8" title="Scherlin">Scherlin</a>
<a href="/sv/varumarken/secrid.html" id="Varum_158" title="Secrid">Secrid</a>
<a href="/sv/varumarken/secto-design.html" id="Varum_98" title="Secto Design">Secto Design</a>
<a href="/sv/varumarken/fabula.html" id="Varum_190" title="Fabula">Fabula</a>
<a href="/sv/varumarken/designers-eye.html" id="Varum_182" title="Designers eye">Designers eye</a>
<a href="/sv/varumarken/sika-design.html" id="Varum_46" title="Sika Design">Sika Design</a>
<a href="/sv/varumarken/skagerak.html" id="Varum_39" title="Skagerak">Skagerak</a>
<a href="/sv/varumarken/skandilock.html" id="Varum_154" title="Skandilock">Skandilock</a>
<a href="/sv/varumarken/skultuna.html" id="Varum_145" title="Skultuna">Skultuna</a>
<a href="/sv/varumarken/bruno-mathsson.html" id="Varum_189" title="Bruno Mathsson">Bruno Mathsson</a>
<a href="/sv/varumarken/smd-design.html" id="Varum_25" title="SMD Design">SMD Design</a>
<a href="/sv/varumarken/thomas-malmberg-design.html" id="Varum_230" title="Thomas Malmberg Design">Thomas Malmberg Design</a>
<a href="/sv/varumarken/dyberg-larsen.html" id="Varum_202" title="Dyberg Larsen">Dyberg Larsen</a>
<a href="/sv/varumarken/spode.html" id="Varum_132" title="Spode">Spode</a>
<a href="/sv/varumarken/1.html" id="Varum_242" title="1">1</a>
<a href="/sv/varumarken/spring.html" id="Varum_241" title="Spring">Spring</a>
<a href="/sv/varumarken/star-trading.html" id="Varum_161" title="Star Trading">Star Trading</a>
<a href="/sv/varumarken/stelton.html" id="Varum_90" title="Stelton">Stelton</a>
<a href="/sv/varumarken/sthal.html" id="Varum_84" title="Sthål">Sthål</a>
<a href="/sv/varumarken/kristensen-och-kristensen.html" id="Varum_244" title="Kristensen och Kristensen">Kristensen och Kristensen</a>
<a href="/sv/varumarken/stockamollan.html" id="Varum_59" title="Stockamöllan">Stockamöllan</a>
<a href="/sv/varumarken/string.html" id="Varum_97" title="String">String</a>
<a href="/sv/varumarken/studio-eero-aarnio.html" id="Varum_144" title="Studio Eero Aarnio">Studio Eero Aarnio</a>
<a href="/sv/varumarken/tre-sekel.html" id="Varum_211" title="Tre Sekel">Tre Sekel</a>
<a href="/sv/varumarken/pomstockholm.html" id="Varum_239" title="Pomstockholm">Pomstockholm</a>
<a href="/sv/varumarken/bosign.html" id="Varum_198" title="Bosign">Bosign</a>
<a href="/sv/varumarken/irislight.html" id="Varum_215" title="IrisLight">IrisLight</a>
<a href="/sv/varumarken/the-case-factory.html" id="Varum_173" title="The Case Factory">The Case Factory</a>
<a href="/sv/varumarken/thg.html" id="Varum_120" title="THG">THG</a>
<a href="/sv/varumarken/pip.html" id="Varum_231" title="Pip">Pip</a>
<a href="/sv/varumarken/artemide.html" id="Varum_248" title="Artemide">Artemide</a>
<a href="/sv/varumarken/tierlantijn-lighting.html" id="Varum_110" title="Tierlantijn Lighting">Tierlantijn Lighting</a>
<a href="/sv/varumarken/tivoli-audio.html" id="Varum_50" title="Tivoli Audio">Tivoli Audio</a>
<a href="/sv/varumarken/tolix.html" id="Varum_29" title="Tolix">Tolix</a>
<a href="/sv/varumarken/emu.html" id="Varum_237" title="Emu">Emu</a>
<a href="/sv/varumarken/tove-adman.html" id="Varum_123" title="Tove Adman">Tove Adman</a>
<a href="/sv/varumarken/tekna.html" id="Varum_213" title="Tekna">Tekna</a>
<a href="/sv/varumarken/guteform.html" id="Varum_197" title="Guteform">Guteform</a>
<a href="/sv/varumarken/vifa.html" id="Varum_83" title="Vifa">Vifa</a>
<a href="/sv/varumarken/friends-founders.html" id="Varum_252" title="Friends & Founders">Friends & Founders</a>
<a href="/sv/varumarken/de-nord.html" id="Varum_228" title="De Nord">De Nord</a>
<a href="/sv/varumarken/voice.html" id="Varum_23" title="Voice">Voice</a>
<a href="/sv/varumarken/voluspa.html" id="Varum_70" title="Voluspa">Voluspa</a>
<a href="/sv/varumarken/watt-veke.html" id="Varum_44" title="Watt & Veke">Watt & Veke</a>
<a href="/sv/varumarken/smak-design.html" id="Varum_187" title="SMAK Design">SMAK Design</a>
<a href="/sv/varumarken/lafuma.html" id="Varum_223" title="Lafuma">Lafuma</a>
<a href="/sv/varumarken/wildlife-garden.html" id="Varum_126" title="Wildlife Garden">Wildlife Garden</a>
<a href="/sv/varumarken/wastberg.html" id="Varum_116" title="Wästberg">Wästberg</a>
<a href="/sv/varumarken/zero.html" id="Varum_113" title="Zero">Zero</a>
<a href="/sv/varumarken/zweed.html" id="Varum_10" title="Zweed">Zweed</a>
<a href="/sv/varumarken/kallholmen.html" id="Varum_207" title="Kallholmen">Kallholmen</a>
<a href="/sv/varumarken/orsjo-belysning.html" id="Varum_21" title="Örsjö Belysning">Örsjö Belysning</a>
<a href="/sv/varumarken/cell.html" id="Varum_208" title="Cell">Cell</a>
<a href="/sv/varumarken/ovrigt.html" id="Varum_100" title="Övrigt">Övrigt</a>
</li>
</ul>
答案 1 :(得分:0)
假设它们是有序的,您可以通过保留前一个字母的记录来比较每个字母与之前的字母,只有在它们已经改变时才添加。
段:
var items = $(".letters>a");
var lastletter = '';
items.each(function(item) {
var letter = $(this).text()[0].toUpperCase();
if (letter != lastletter) {
$("<div class='letter'>" + letter + "</div>").insertBefore(this);
lastletter = letter;
}
});
.letters > a {
display:block;
}
.letter {
color:red;
margin-top:0.75em;
border-top:1px solid #CCC;
min-width:100px;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div class='letters'>
<a>a1</a>
<a>a2</a>
<a>a3</a>
<a>b1</a>
<a>b2</a>
<a>c1</a>
<a>z1</a>
<a>z2</a>
<a>z3</a>
</div>