Wednesday, 2 October 2013

jQuery sortable (an empty string)

jQuery sortable (an empty string)

html
<ul id="user-stream-list" class="user-stream-list ui-sortable">
<li id="36" class="feed" style="position: relative; left: 0px; top:
0px;"><span class="cat-title" data-title="36">Tech Crunch<span
class="edit-title" style="right: 35px;">rename</span><span
class="delete-title">×</span></span>
<ul class="ui-sortable">
</ul>
</li>
<li id="37" class="feed" style="position: relative; left: 0px; top:
0px;"><span class="cat-title" data-title="37">Apple<span
class="edit-title">rename</span></span>
<ul class="ui-sortable">
<li class="feed sub"><a data-uid="18" data-fid="11"
href="http://appleinsider.com/appleinsider.rss"><img
src="https://www.google.com/s2/favicons?domain=appleinsider.com"
class="favicon"><span class="title">AppleInsider - Frontpage
News</span><span class="options"><span data-fid="11"
class="addcat">+</span><span
class="delete">×</span></span></a></li>
</ul>
</li>
</ul>
jquery
$( "#user-stream-list" ).sortable({
update : function () {
var order = $('#user-stream-list').sortable('serialize');
console.log(order);
//$("#info").load("process-sortable.php?"+order);
}
});
When I rearrange the following my console.log() returns (an empty string)
I'm clueless with why its not showing anything. jsFiddle

No comments:

Post a Comment