Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
 
 
 
 
 
 

44 rader
934 B

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