Widget:CharacterList: Difference between revisions
From Unforgotten Realms Wiki
Jump to navigationJump to search
imported>Pillowkeeper No edit summary |
imported>Pillowkeeper No edit summary |
||
| Line 9: | Line 9: | ||
<script> | <script> | ||
var charList = 2; | var charList = [1,2]; | ||
if($("#charSelect").length <= charList.length + 3) { | if($("#charSelect").length <= charList.length + 3) { | ||
var series = []; | var series = []; | ||
Revision as of 05:58, 26 April 2017
<script src="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-3.2.0.min.js"></script> <select id="charSelect"> <option>Season 1 Characters</option> <option>Season 2 Characters</option> <option>All Characters</option> </select>
<script> var charList = [1,2]; if($("#charSelect").length <= charList.length + 3) { var series = []; var obj = {}; obj["name"] = ""; obj["id"] = ""; series.push(obj); console.log(series);
for(j = 0; j < series.length; j++){ console.log("hello"); $('#charSelect').append("<option>" + series[j].name + "</option>"); } } </script>


