Source: icontains.js

/*
 * Copyright 2013-2017 Hewlett Packard Enterprise Development Company, L.P.
 * Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License.
 */

/**
 * @module js-whatever/js/icontains
 * @desc jQuery pseudo selector to test if an element contains a particular string, ignoring case
 * @example
 * // <div class="test">cats</div>
 *
 * var $test = $('.test');
 *
 * $test.filter(':icontains("cats")').length; // returns 1
 * $test.filter(':icontains("CATS")').length; // returns 1
 * $test.filter(':icontains("bears")').length; // returns 0
 */
define([
    'jquery'
], function($) {
    'use strict';

    $.expr[':'].icontains = $.expr.createPseudo(function(arg) {
        return function(elem) {
            return $(elem).text().toUpperCase().indexOf(arg.toUpperCase()) >= 0;
        };
    });
});
Copyright 2013-2018 Micro Focus International plc. Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License.
Documentation generated by JSDoc 3.4.3 on Thu Jun 21st 18:04 2018 using the DocStrap template.