[jQuery] Re: HowTo Select first two characters of an li and hide them
Something like this maybe $('div.multiple_options li').each(function(){ var text = $(this).html() $(this).html( text.replace(/\d+\s+/,'') ) }) But please remove that ugly br inside your li tags and make them block elements instead to achieve the same effect. / Johan On 25 Mar, 14:03, 262Rui i...@noiteglobal.com wrote: This is My markup div class=multiple_options_caption Features/div div class=multiple_options ulli class=features11 Classic Designbr/li li class=features14 Countryside Viewbr/li li class=features17 Space for Swimming Poolbr/li li class=features21 Garagebr/li li class=features22 Spacious Garden br/li li class=features24 Landscaped Gardenbr/li li class=features27 BBQbr/li li class=features29 Guest parking /li /ul /div and i would like to hide/remove the first 2 numbers fom my li.features How can this be achieved? kind Regards Rui
[jQuery] Re: HowTo Select first two characters of an li and hide them
Tank you so much for both tips - Original Message - From: johan.bores...@gmail.com To: jQuery (English) jquery-en@googlegroups.com Sent: Wednesday, March 25, 2009 2:07 PM Subject: [jQuery] Re: HowTo Select first two characters of an li and hide them Something like this maybe $('div.multiple_options li').each(function(){ var text = $(this).html() $(this).html( text.replace(/\d+\s+/,'') ) }) But please remove that ugly br inside your li tags and make them block elements instead to achieve the same effect. / Johan On 25 Mar, 14:03, 262Rui i...@noiteglobal.com wrote: This is My markup div class=multiple_options_caption Features/div div class=multiple_options ulli class=features11 Classic Designbr/li li class=features14 Countryside Viewbr/li li class=features17 Space for Swimming Poolbr/li li class=features21 Garagebr/li li class=features22 Spacious Garden br/li li class=features24 Landscaped Gardenbr/li li class=features27 BBQbr/li li class=features29 Guest parking /li /ul /div and i would like to hide/remove the first 2 numbers fom my li.features How can this be achieved? kind Regards Rui
[jQuery] Re: HowTo Select first two characters of an li and hide them
li class=features22 Spacious Garden br/li Why don't you put the Metadata into one of the appropriate attributes like id? If you do so, any of your li Element is addressed by that and could easily be handled. And please don't use the br if there's no proper use for it
[jQuery] Re: HowTo Select first two characters of an li and hide them
Im working on the frontend of an old proprietary system that trows those br / before closing the li so i dont have a way to change that ... - Original Message - From: benjamin.josefus b...@jfoot.de To: jQuery (English) jquery-en@googlegroups.com Sent: Wednesday, March 25, 2009 2:38 PM Subject: [jQuery] Re: HowTo Select first two characters of an li and hide them li class=features22 Spacious Garden br/li Why don't you put the Metadata into one of the appropriate attributes like id? If you do so, any of your li Element is addressed by that and could easily be handled. And please don't use the br if there's no proper use for it