Permalink
Browse files

fixed bug in mb_sortable_elements js function that wasnt targeting co…

…rrectly the element on which you performed the sort on
  • Loading branch information...
madalinungureanu committed Nov 17, 2011
1 parent 8fb440c commit 2fee526a6dd1376602ba58b08d062289c1065494
Showing with 3 additions and 3 deletions.
  1. +3 −3 custom-fields-creator.js
View
@@ -110,10 +110,10 @@ function mb_sortable_elements() {
jQuery( ".mb-table-container tbody" ).not( jQuery( ".mb-table-container.single tbody" ) ).sortable({
update: function(event, ui){
- var value = jQuery(".mb-table-container").prev().attr('id');
- var id = jQuery(".mb-table-container").attr('post');
+ var value = jQuery(event.target).parent().prev().attr('id');
+ var id = jQuery(event.target).parent().attr('post');
- var result = jQuery(".mb-table-container tbody").sortable('toArray');
+ var result = jQuery(event.target).sortable('toArray');
var values = {};
for(var i in result)

0 comments on commit 2fee526

Please sign in to comment.