Hi Everyone.
I am getting problem with using jquery.
I have made a separate javascript file for all the project. My project folder name is ‘main_project’ and js file path is ‘/main_project/js/layout.js’.
whenever I write code in following format the code is working for any module and it’s view.
function delete_row(id) {
$('#record_row' + id).remove();
}
but when I write the code in following format It’s not working even I think it is not detecting the html element for any modules view.
$(document).ready(function() {
$('#record_row' + id).remove();
});
For executing my code in this format. I am writing this code in my every view file under modules everywhere. But It’s creating problems now.
I have tried every possible way to execute these scripts with a single separate file. But it did not work till now.
I must have to use jquery scripts in a separate file to prevent unobtrusive java script problems.
Note: These code’s are just a example actual codes are different.
Thanks,
Abhay Gupta,