I developed a plugin architecture application. Each time a plugin is added, a link is added to the main MVC app using jquery, the script is loaded dynamically from a js file in the plugin (DLL) and that link will be the entry point to the new module, the script successfully adds the link to the razor page but when I click on the link it does not work.
Here is the code.
Ps: I am not really good at javascript so forgive me if am making a stupid mistake in my code and couldn't find the solution.
$(document).ready(function () {
$("#myLinkDiv").append('<a id="aLink" href="#">ClickMe</a>');
$("#aLink").click(function () {
event.preventDefault();
$.ajax({
url: '/Candidate/CreateCandidate/',
type: 'GET',
success: function (data) {
return data;
}
});
});
});