title: Play Framework - Using Javascript Variable in Scala Template
body: <p>So I have something that looks like this:</p>
  
  <pre><code>&lt;script&gt;
  $(document).ready(function(){
    $("button.fadeMeOut").click(function(){
        var fadeID = $(this).attr('id');
        window.location.href = '@routes.Application.function(fadeID)';
    });
  });
  &lt;/script&gt;
  </code></pre>
  
  <p>Of course this code will give a <code>not found: value fadeID</code> error. Is there a way for me to do something like this in Play Scala template?</p>