Javascript suggestion
-
Hi there,
I needed to extend some functionality of this plugin and had a look at your javascript. Actually can’t believe how simple it was to implement the Javascript. Great work!
I’m referring to this snippet:
$('table.posts #the-list, table.pages #the-list').sortable({ 'items': 'tr', 'axis': 'y', 'helper': fixHelper, 'update' : function(e, ui) { $.post( ajaxurl, { action: 'update-menu-order', order: $('#the-list').sortable('serialize'), }); } });Would you possible consider adding something like the following, to allow for extension?
$('table.posts #the-list, table.pages #the-list').sortable({ 'items': 'tr', 'axis': 'y', 'helper': fixHelper, 'update' : function(e, ui) { $.post( ajaxurl, { action: 'update-menu-order', order: $('#the-list').sortable('serialize'), }).done( function() { var event = jQuery.Event( "hicpo-sorted" ); $( "body" ).trigger( event ); }); } });
The topic ‘Javascript suggestion’ is closed to new replies.