Sort An Unordered List Alphabetically
I want to sort an unordered list alphabetically. I've tried many different javascript solutions, not one of them worked (tested in Safari and Chrome). This is the code I would like
Solution 1:
Here's a working example on JSFiddle: https://jsfiddle.net/vzbgzexc/
Make sure that you're loading jQuery. It doesn't look like anywhere in your code that you're loading jQuery, yet you're using $
. You're likely receiving an error in your browser's console similar to this:
ReferenceError:$ is notdefined
Insert:
<scriptsrc="https://code.jquery.com/jquery-3.0.0.min.js"></script>
Hope that helps!
Post a Comment for "Sort An Unordered List Alphabetically"