i create the html items dynamically with Django.
{% for scraper in scrapers %}
<div class='scraper_item'>
<ul class="scraper_actions1">
<li><a href="/schedule/{{ scraper.id }}">Schedule</a></li>
<li><a class="delete" id="{{ scraper.id }}" href="/delete/{{scraper.id}}">Delete</a></li>
</ul>
</div>
{% endfor %}
I pass 'scrapers' as the model objects into html page and list them. I want to process each object selected by id with the same jQuery function. How can i do selection of a particular element to pass it to Django views def delete(request, scraper_id) without multiply coding?
$("a.delete").click(function(event){
alert("going to delete...");
...???
return false;
});