Bug Tracker

Ticket #278 (closed enhancement: worksforme)

Opened 2 years ago

Last modified 3 months ago

Make :contains() be optionally case insensitive

Reported by: yehuda Assigned to: anonymous
Type: enhancement Priority: trivial
Milestone: Component: core
Version: Keywords:
Cc: Needs:

Description

At the moment, :contains() is case sensitive only.

We need a way to make it optionally case insensitive.

Attachments

Change History

  Changed 2 years ago by anonymous

  • priority changed from major to trivial
  • type changed from bug to enhancement

follow-up: ↓ 3   Changed 2 years ago by joern

  • status changed from new to closed
  • version deleted
  • resolution set to worksforme
  • milestone deleted

This could easily be added when required:

$.extend($.expr:?, {

"contains-ic": "jQuery.fn.text.apply([a])toLowerCase().indexOf(m[3].toLowerCase())>=0",

});

Untested, but pretty simple.

in reply to: ↑ 2   Changed 3 months ago by weaverryan

If anybody's looking for a tested version of the above:

	jQuery.extend(jQuery.expr[':'], {
		"contains-ic": "jQuery.fn.text.apply([a]).toLowerCase().indexOf(m[3].toLowerCase())>=0",
	});
Note: See TracTickets for help on using tickets.