I'm using the Sortable ponent of jQuery UI. The callbacks don't seem to work at all, even with this minimalistic test:
<script type="text/javascript" src="jquery-1.3.js"></script>
<script type="text/javascript" src="jquery-ui-personalized-1.6rc4.js"></script>
<script type="text/javascript">
$(document).ready(function () {
$("#outer").sortable({
start: function (e, ui) {
alert("started");
},
update: function (e, ui) {
alert("updated");
}
});
});
</script>
<ul id="outer">
<li>apple</li>
<li>orange</li>
</ul>
I get none of the alerts when I reorder these elements.
Is my usage correct or am I perhaps misreading the documentation?
start Function(Event, ui)
Function that gets called when sorting starts.
I'm using the Sortable ponent of jQuery UI. The callbacks don't seem to work at all, even with this minimalistic test:
<script type="text/javascript" src="jquery-1.3.js"></script>
<script type="text/javascript" src="jquery-ui-personalized-1.6rc4.js"></script>
<script type="text/javascript">
$(document).ready(function () {
$("#outer").sortable({
start: function (e, ui) {
alert("started");
},
update: function (e, ui) {
alert("updated");
}
});
});
</script>
<ul id="outer">
<li>apple</li>
<li>orange</li>
</ul>
I get none of the alerts when I reorder these elements.
Is my usage correct or am I perhaps misreading the documentation?
Share edited Jan 21, 2009 at 19:08 Ateş Göral asked Jan 21, 2009 at 18:42 Ateş GöralAteş Göral 140k27 gold badges141 silver badges191 bronze badges 2start Function(Event, ui)
Function that gets called when sorting starts.
- What does firebug (or your preferred javascript debugger) say? I got it working with jQuery 1.3 and the current jQuery UI (personalized: core, draggable, sortable), version 1.6rc5. – Tomalak Commented Jan 21, 2009 at 19:08
- I'm on Firefox and I get absolutely no errors/warnings. It's just dead silent. However, sorting works as expected. It's just the callbacks that don't seem to work. I'm trying to avoid digging into jQuery UI code :( – Ateş Göral Commented Jan 21, 2009 at 19:14
2 Answers
Reset to default 2It seems that the .sortable() is having some technical difficulties according to this post. You may need to use SVN to download the latest trunk release to fix it.
I was able to work around this problem by including two versions of jquery simultaneously. Check it out here: http://gist.github./59757
Hope it helps!