Permalink
Browse files

Type fix (in docs)

  • Loading branch information...
1 parent 9ae8ead commit 006f755406f299380abb1c0f94ce18df5cdd39c3 @arturadib committed Jun 8, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 docs/5.html
View
@@ -30,11 +30,11 @@
<span class="p">},</span></pre></div> </td> </tr> <tr id="section-7"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-7">&#182;</a> </div> <p><code>unrender()</code>: Makes Model remove itself from the DOM.</p> </td> <td class="code"> <div class="highlight"><pre> <span class="nx">unrender</span><span class="o">:</span> <span class="kd">function</span><span class="p">(){</span>
<span class="nx">$</span><span class="p">(</span><span class="k">this</span><span class="p">.</span><span class="nx">el</span><span class="p">).</span><span class="nx">remove</span><span class="p">();</span>
<span class="p">},</span></pre></div> </td> </tr> <tr id="section-8"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-8">&#182;</a> </div> <p><code>swap()</code> will interchange an <code>Item</code>'s attributes. When the <code>.set()</code> model function is called, the event <code>change</code> will be triggered.</p> </td> <td class="code"> <div class="highlight"><pre> <span class="nx">swap</span><span class="o">:</span> <span class="kd">function</span><span class="p">(){</span>
- <span class="kd">var</span> <span class="nx">swaped</span> <span class="o">=</span> <span class="p">{</span>
+ <span class="kd">var</span> <span class="nx">swapped</span> <span class="o">=</span> <span class="p">{</span>
<span class="nx">part1</span><span class="o">:</span> <span class="k">this</span><span class="p">.</span><span class="nx">model</span><span class="p">.</span><span class="nx">get</span><span class="p">(</span><span class="s1">&#39;part2&#39;</span><span class="p">),</span>
<span class="nx">part2</span><span class="o">:</span> <span class="k">this</span><span class="p">.</span><span class="nx">model</span><span class="p">.</span><span class="nx">get</span><span class="p">(</span><span class="s1">&#39;part1&#39;</span><span class="p">)</span>
<span class="p">};</span>
- <span class="k">this</span><span class="p">.</span><span class="nx">model</span><span class="p">.</span><span class="nx">set</span><span class="p">(</span><span class="nx">swaped</span><span class="p">);</span>
+ <span class="k">this</span><span class="p">.</span><span class="nx">model</span><span class="p">.</span><span class="nx">set</span><span class="p">(</span><span class="nx">swapped</span><span class="p">);</span>
<span class="p">},</span></pre></div> </td> </tr> <tr id="section-9"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-9">&#182;</a> </div> <p><code>remove()</code>: We use the method <code>destroy()</code> to remove a model from its collection. Normally this would also delete the record from its persistent storage, but we have overridden that (see above).</p> </td> <td class="code"> <div class="highlight"><pre> <span class="nx">remove</span><span class="o">:</span> <span class="kd">function</span><span class="p">(){</span>
<span class="k">this</span><span class="p">.</span><span class="nx">model</span><span class="p">.</span><span class="nx">destroy</span><span class="p">();</span>
<span class="p">}</span>

0 comments on commit 006f755

Please sign in to comment.