[jQuery] Re: Case-insensitive version of :contains(text) ?

2008-10-09 Thread bdee1
this doesn't seem to work for me I assume i just add the jQuery.extend business in the head of the HTML file after my jquery include but before my other jquery functions? Karl Swedberg-2 wrote: On Oct 19, 2007, at 2:09 AM, Erik Beeson wrote: You could add your own expression for it

[jQuery] Re: Case-insensitive version of :contains(text) ?

2008-10-09 Thread Eric Martin
Something like: script type='text/javascript' src='jquery.js' / script type='text/javascript' [define custom expression here] $(document).ready(function () { [use custom expression here] }); /script [the rest of your scripts here] -Eric

[jQuery] Re: Case-insensitive version of :contains(text) ?

2007-10-19 Thread Karl Swedberg
On Oct 19, 2007, at 2:09 AM, Erik Beeson wrote: You could add your own expression for it (tested on FF2/Mac): jQuery.extend(jQuery.expr[':'], { containsIgnoreCase: (a.textContent||a.innerText||jQuery(a).text ()||'').toLowerCase().indexOf((m[3]||'').toLowerCase())=0 }); Usage:

[jQuery] Re: Case-insensitive version of :contains(text) ?

2007-10-19 Thread Erik Beeson
You could add your own expression for it (tested on FF2/Mac): jQuery.extend(jQuery.expr[':'], { containsIgnoreCase: (a.textContent||a.innerText||jQuery (a).text()||'').toLowerCase().indexOf((m[3]||'').toLowerCase())=0 }); Usage: $('...:containsIgnoreCase(foo)'); Or you could use a filter

[jQuery] Re: Case-insensitive version of :contains(text) ?

2007-10-18 Thread RichUncleSkeleton
(bump) anyone have any ideas? On Oct 13, 7:01 pm, RichUncleSkeleton [EMAIL PROTECTED] wrote: The selector :contains(text) appears to be case sensitive (though there's no mention of this in the jQuery docs). Is there a case insensitive version?