Created
February 22, 2017 10:11
-
-
Save iaditya/d50dadaf39c0fdf99246e8e829e1c849 to your computer and use it in GitHub Desktop.
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
success: function (response) { | |
if (response) { | |
var eventData = response.events; | |
var arr = [], i; | |
for (i in eventData) arr.push([i, eventData[i]].join('$$')); | |
var reverseData = arr.reverse(); | |
var append_text = ""; | |
$.each(reverseData, function (option_value, option_text) { | |
var text = option_text.split("$$"); | |
append_text += "<option value='" + text[0] + "'>" + text[1] + "</option>"; | |
}); | |
events.html(""); | |
events.append(append_text); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment