3 * https://github.com/ExactTarget/fuelux
5 * Copyright (c) 2012 ExactTarget
6 * Licensed under the MIT license.
9 define(['require','jquery'],function (require) {
11 var $ = require('jquery');
13 // custom case-insensitive match expression
14 function fuelTextExactCI(elem, text) {
15 return (elem.textContent || elem.innerText || $(elem).text() || '').toLowerCase() === (text || '').toLowerCase();
18 $.expr[':'].fuelTextExactCI = $.expr.createPseudo ?
19 $.expr.createPseudo(function (text) {
20 return function (elem) {
21 return fuelTextExactCI(elem, text);
24 function (elem, i, match) {
25 return fuelTextExactCI(elem, match[3]);