[jQuery] Re: Help with replace the string.

2007-06-08 Thread Mike Alsup
Try something like this: $('option:first').css('color','#f00'); How can I change the colour of [1st] (only [1st], A in original colour)? Thanks

[jQuery] Re: Help with replace the string.

2007-06-08 Thread Kixe
How can I change the colour of [1st] (only [1st], A in original colour)? Thanks On 6月9日, 上午12時18分, "Mike Alsup" <[EMAIL PROTECTED]> wrote: > Here's one way: > > $('option:contains("("), option:contains(")"').each(function() { > var $this = $(this); > var t = $this.text(); > $this.text

[jQuery] Re: Help with replace the string.

2007-06-08 Thread Mike Alsup
Here's one way: $('option:contains("("), option:contains(")"').each(function() { var $this = $(this); var t = $this.text(); $this.text(t.replace(')',']').replace('(','[')); }); On 6/8/07, Kixe <[EMAIL PROTECTED]> wrote: I would like to replace the follow code symbol "(" and ")" to