jQuery 1.9 has been refactored a great deal. Perhaps the UI version you have has been tailored specifically to that version.
http://jquery.com/upgrade-guide/1.9/ On Sat, Apr 6, 2013 at 7:14 AM, Lucky1968 <[email protected]> wrote: > Hi, > > > I'm using jQuery UI Sortable in a CakePHP application to drag and drop > table rows to rearrange their order. On drop the new position should be > saved in the db. > > > Everything works fine with jQuery 1.9 but we need to have it working with > jQuery 1.8.2. > > With jQuery 1.8.2 the jQuery UI Sortable also works fine, it only doesn't > save the new position to the db with 1.8.2. > > > We can't use jQuery 1.9 since that will break up other parts of the site. > > > Does anyone happen to know if something has changed between 1.8 and 1.9 > regarding this? > > > Thanx in advance for any help. > > > This is my code, which works fine in 1.9 but doesn't save in 1.8: > > > $(function() { > > > var fixHelper = function(e, ui) { > > ui.children().each(function() { > > $(this).width($(this).width()); > > }); > > return ui; > > }; > > > $( "#sortable" ).sortable({ > > helper: fixHelper, > > stop: function(event, ui) { > > $.ajax({ > > url: url + '/' + ui.item.data('id'), > > dataType: 'json', > > data: {id: ui.item.data('id'), listing: ui.item.index()}, > > success: afterSave, > > method: 'POST' > > }); > > } > > }); > > > $( "#sortable" ).disableSelection(); > > > var afterSave = function(data) { > > console.log(data); > > }; > > }); > > > -- > Like Us on FaceBook https://www.facebook.com/CakePHP > Find us on Twitter http://twitter.com/CakePHP > > --- > You received this message because you are subscribed to the Google Groups > "CakePHP" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/cake-php?hl=en. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups "CakePHP" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/cake-php?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
