DoneJS StealJS jQuery ++ FuncUnit DocumentJS
3.0.0
2.3.27

 

  • Github
  • Twitter
  • Chat
  • Forum
  • Bitovi
    • Bitovi.com
    • Blog
    • Consulting
    • Training
    • Open Source
  • Chat
  • Forum
  • Star
  • Follow @canjs
  • Update Text in the Page
  • / On this page
    • Update Text in the Page

      page
      • source

      CanJS will update the page automatically when observable data changes. To make observable data, pass raw data to can.Map, can.List or can.compute like:

      var data = new can.Map({message: "Hello World!"});
      

      To change the message, use the attr() method of can.Map.

      data.attr("message", "Goodbye World!")
      

      When the button is clicked in the example below, the message is changed with data.attr().

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