To keep (almost all) the same, set the context for the ajax call:
$. Ajax ({context: this, success: function () {...}});
In another note, I just did, recommending something similar to another person regarding how to configure click events ...
$('document.body').on('click', '.star', function () {....});
Provides you with the same functionality, improves performance, and automatically embeds any elements added or removed to a document with a star class.
source share