DoneJS StealJS jQuery ++ FuncUnit DocumentJS
3.0.0
2.3.27

 

  • Github
  • Twitter
  • Chat
  • Forum
  • Guides
  • Core
  • Ecosystem
  • Infrastructure
    • can-construct
    • can-control
    • can-event
    • can-event/async/async
    • can-event/batch/batch
    • can-observation
    • can-simple-map
    • can-util
      • can-util/dom
        • ./ajax/
        • ./attr/
        • ./child-nodes/
        • ./class-name/
          • className.add
          • className.has
          • className.remove
        • ./data/
        • ./dispatch/
        • ./document/
        • ./events/
        • ./frag/
        • ./mutate/
      • can-util/js
    • can-view-callbacks
    • can-view-live
    • can-view-model
    • can-view-nodelist
    • can-view-parser
    • can-view-scope
    • can-view-target
  • Legacy
  • Bitovi
    • Bitovi.com
    • Blog
    • Consulting
    • Training
    • Open Source
  • Chat
  • Forum
  • Star
  • Follow @canjs
  • CanJS
  • /
  • Infrastructure
  • /
  • can-util
  • /
  • can-util/dom
  • /
  • ./class-name/
  • /
  • className.has
  • / On this page
    • className.has

      function
      • source

      className.has.call(el, cls)

      Determine wheter a DOM node has a given class name.

      var isContainer = className.has.call(el, "container");
      

      Parameters

      1. className {String}:

        A string representing a single class name token

      Returns

      {Boolean}:

      true if the element's class attribute contains the token, false otherwise.

      CanJS is part of DoneJS. Created and maintained by the core DoneJS team and Bitovi. Currently 3.0.0.