title: how can I use jquery with yii2
body: <p>I am new in Yii framework (version 2.0) and I want to add some jQuery code to my page:</p>
  
  <pre><code>$(document).ready(function(){
      $('div').click(function(){
          $(this).hide()
      });
  });  
  </code></pre>
  
  <p>This code will hide the div when I click on it, can I declare <code>&lt;script&gt;</code> in the view?</p>
  
  <p>And how can I write this code in jQuery?</p>