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/mustache" 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.
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: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.