Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
jQuery Sortable issue in IE9
<!--
Error: Object doesn't support property or method 'attr'
-->
<div class='popover' id='playlist_menu'>
<ul class='toplay' style='overflow:auto'>
<li class='playlist_item' data-id='27' data-order='1' id='videos_27'></li>
<li class='playlist_item' data-id='1' data-order='2' id='videos_1'></li>
<li class='playlist_item' data-id='52' data-order='3' id='videos_52'></li>
</ul>
</div>
// Error: Object doesn't support property or method 'attr'
var items = $(".popover ul.toplay").sortable("toArray");
var i, n;
for (i = 0, n = items.length; i < n; i++) {
var item = $(".playlist_item#" + items[i]);
item.attr("data-order", i + 1); // This is where the error comes from
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.