jQuery Migration deprecated functions.
jQuery Migration deprecated functions.
RobertKohut
Posts: 1Questions: 0Answers: 0
I'm currently in the process of migrating to the jQuery 1.9.1. During this process I'm cleaning up all of the code in my repository and using jQuery Migrate to find and replace deprecated functions.
https://github.com/jquery/jquery-migrate/blob/master/warnings.md#jqmigrate-jqueryfnattrselected-may-use-property-instead-of-attribute
Line 2777 jquery.dataTables.js version 1.9.4 is currently currently using .attr("selected", true). The latest jQuery 1.9+ should have these methods/functions changed to .prop().
It's a quick fix, but I'm currently running DataTables on a CDN.
https://github.com/jquery/jquery-migrate/blob/master/warnings.md#jqmigrate-jqueryfnattrselected-may-use-property-instead-of-attribute
Line 2777 jquery.dataTables.js version 1.9.4 is currently currently using .attr("selected", true). The latest jQuery 1.9+ should have these methods/functions changed to .prop().
It's a quick fix, but I'm currently running DataTables on a CDN.
This discussion has been closed.
Replies
Allan
I am running into an issue that might be solved by this same update to jQuery 1.9+. In asp.net there is a updatepanel tag that essentially makes it so the table can be updated by ajax. However, when the table is updated by ajax all of the datatable functionality stops/clears. It might get solved if there was a setting to use a live (old jQuery syntax) of the datatable.
ie jQuery 1.6 and below used to allow $(".dataTable").live("click", function () {});
however 1.7+ now has to be written $(selectedContainer).on("click", ".dataTable", function () {});
I believe, not 100% positive, that by allowing DataTables to use this functionality, probably as a setting, then those developers using updatepanel will be able to configure datatables to see the change and reapply the datatable functionality with the new data. This would probably work for other scenarios where datatables does not do the ajax functionality and some other framework does that functionality.
Do you think that this would be possible?
Allan
The examples above are the code that you have to write for jQuery to realize that the dom has changed and to automatically re-apply the event handlers.
Can you link me to a test page showing what you've got with the old jQuery? That might help me understand.
Allan