| 1 | /*! |
| 2 | * jQuery UI :data 1.14.2 |
| 3 | * https://jqueryui.com |
| 4 | * |
| 5 | * Copyright OpenJS Foundation and other contributors |
| 6 | * Released under the MIT license. |
| 7 | * https://jquery.org/license |
| 8 | */ |
| 9 | |
| 10 | //>>label: :data Selector |
| 11 | //>>group: Core |
| 12 | //>>description: Selects elements which have data stored under the specified key. |
| 13 | //>>docs: https://api.jqueryui.com/data-selector/ |
| 14 | |
| 15 | ( function( factory ) { |
| 16 | "use strict"; |
| 17 | |
| 18 | if ( typeof define === "function" && define.amd ) { |
| 19 | |
| 20 | // AMD. Register as an anonymous module. |
| 21 | define( [ "jquery", "./version" ], factory ); |
| 22 | } else { |
| 23 | |
| 24 | // Browser globals |
| 25 | factory( jQuery ); |
| 26 | } |
| 27 | } )( function( $ ) { |
| 28 | "use strict"; |
| 29 | |
| 30 | return $.extend( $.expr.pseudos, { |
| 31 | data: $.expr.createPseudo( function( dataName ) { |
| 32 | return function( elem ) { |
| 33 | return !!$.data( elem, dataName ); |
| 34 | }; |
| 35 | } ) |
| 36 | } ); |
| 37 | } ); |