title: jQuery ajax in js file
body: <p>I am  using <code>ASP.Net-MVC3</code> and  I use this query in </p>
  
  <p><strong>Layout.cshtml</strong>:</p>
  
  <pre><code>$(function() {
      $.ajax({
          url: '@Url.Action("EtiketGetir", "Etiket")',
          type: "POST",
          data: {
              data: data
          },
          success: function(msg) {},
          error: function(msg) {}
      });​
  </code></pre>
  
  <p>That works in <code>layout.cshtml</code>, but I copied that code and pasted to <code>test.js</code> file and it stopped working.</p>