I am new to Javascript and trying to implement AJAX generation of html DELETE request to Play 2 Framework server. In Scala template I have this for now. It prints all fields of my model class Item and then I need to handle a click at a href using JQuery. 
How can I fix the code and also pass appropriate item.id into AJAX request?
@(item: Item)
<ul>
  @for(field <- item.getClass().getFields()) {
    <li>@field.getName() = @field.get(item)</li>
  }
</ul>
<a href="#" data-id="@item.id" id="delete">delete</a>
   <script type="text/javascript">
    $("#delete").click(function() {
        var id = $(this).attr("data-id");
        alert(id);
        jsRoutes.controllers.Items.delete(id).ajax({});
        return false;
    });
   </script>
This link is very useful but does not give example of integrating jquery and javascript router in detail: