DoneJS StealJS jQuery ++ FuncUnit DocumentJS
3.0.0
2.3.27

 

  • Github
  • Twitter
  • Chat
  • Forum
  • Guides
    • introduction
      • Mission
      • Technical Highlights
      • Who uses CanJS?
    • experiment
      • Chat Guide
      • TodoMVC Guide
      • ATM Guide
      • Setting up CanJS
    • commitment
      • API Guide
      • Examples
      • Roadmap
      • Migrating to 3.0
    • contribute
      • Bug Report
      • Code
      • Documentation
      • Evangelism
      • Feature Suggestion
      • Releases
  • Core
  • Ecosystem
  • Infrastructure
  • Legacy
  • Bitovi
    • Bitovi.com
    • Blog
    • Consulting
    • Training
    • Open Source
  • Chat
  • Forum
  • Star
  • Follow @canjs
  • CanJS
  • /
  • Guides
  • /
  • Examples
  • / On this page
    • Examples

      page
      • source

      Get Started

      There are a variety of ways to get CanJS. Read the using CanJS guide for comprehensive list. For the following recipes, we will load CanJS with a <script> tag pointed to CanJS's CDN.

      Create a file called myapp.html and put the following in it to get started:

      <script src="//code.jquery.com/jquery-1.10.1.min.js"></script>
      <script src="//canjs.com/release/2.0.4/can.jquery.js"></script>
      <script type="text/stache" id="app-template">
      //Template will go here
      </script>
      <script>
      //Application code will go here
      </script>
      
      <!-- CanJS needs a place to put your application -->
      <div id="my-app"></div>
      

      To follow along with the other recipes, you can also use this JSFiddle as a template.

      You can also Download CanJS or follow other tutorials to get started, but for the rest of the examples, we’ll be using this setup.

      Request a Recipe

      To request a new recipe or vote on an upcoming one, submit an issue to the canjs.com respository on GitHub.

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