Created
October 23, 2009 02:35
-
-
Save geetfun/216591 to your computer and use it in GitHub Desktop.
To sort order
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
orderize: function(options) { | |
var sortOrder = []; | |
if (!options) { | |
var options = $.shopscaler.productOptions.container.find("li"); | |
options.each(function(i) { | |
sortOrder.push($(this).attr("id").split("-")[2]); | |
}); | |
} else { | |
$.each(options, function() { | |
alert(this.split("-")[2]); | |
var id = this.split("-")[2]; | |
if (typeof(id) == "undefined") { | |
sortOrder.push("123123123"); | |
} else { | |
sortOrder.push(this.split("-")[2]); | |
}; | |
}); | |
}; | |
return sortOrder; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment