html:
<ul class="sortable">
<li id="1">Strona Główna</li>
<li id="4">Kategorie</li>
<li id="6">Spis Treści</li>
<li id="7">Współpraca</li>
<li id="8">Kontakt</li>
</ul>
I use html5sortable plugin for jquery to use sortale list.
From here: http://farhadi.ir/projects/html5sortable/
When I use this script:
$('.sortable').sortable();
$('.sortable').bind('sortupdate', function() {
alert(1);
});
It works perfectly, I can sort list, dragging works. And when I make change alert(1) appears.
But when I change script to this:
$('.sortable').sortable();
$('.sortable').bind('sortupdate', function() {
$.ajax({
data: data,
type: 'POST',
url: 'update-menu',
dataType: 'json';
});
});
Now I can't even drag elements, it's totaly not possible. And I can't figure out what is happening here...