Created
July 19, 2012 05:52
-
-
Save terenceponce/3141054 to your computer and use it in GitHub Desktop.
jQuery Sortable issue in IE9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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