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-view-callbacks
    • can-view-live
      • can-view-live.attr
      • can-view-live.html
      • can-view-live.list
      • can-view-live.text
    • 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-view-live
  • /
  • can-view-live.attr
  • / On this page
    • can-view-live.attr

      function
      • source

      live.attr(el, attributeName, compute)

      Keep an attribute live to a can-compute.

      var div = document.createElement('div');
      var compute = canCompute("foo bar");
      live.attr(div,"class", compute);
      

      Parameters

      1. el {HTMLElement}:

        The element whos attribute will be kept live.

      2. attributeName {String}:

        The attribute name.

      3. compute {can-compute}:

        The compute.

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