Get id for use as variable data in ajax call JQUERY : I cannot get the id from links calling the same ajax function.

The 30+ links are generated dynamically, as follows:-

    <a href="javascript:void(0)" id="105">Item 105</a>
    <a href="javascript:void(0)" id="379">Item 379</a>
    <a href="javascript:void(0)" id="534">Item 534</a>
    etc

This is my latest attempt, after much googling, including http://stackoverflow.com/questions/11687217/variable-data-in-ajax-call-jquery):-

    $(this).click(function(){
    	var $id = $(this).attr('id');
        $.ajax({url: "somefile.asp", data: {sellerid: <%=sellerid%>, uid: <%=uid%>, itinid: $id}, success: function(result){
            $("#content").html(result);
        }});
    });

The ajax works fine (but with fixed result) for each link when I test with for example:-  var $id = 379;

Grateful for any help! Thanks