You can add the id's as data-title-id and data-user-id attributes on the .star element. Then in the event handler you can do $(this).attr('data-title-id') to get the title id.
Edit example:
<span class="star" data-title-id="74">
Now in the click handler
$(this).attr('data-title-id')
Should return "74"