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 5: | Line 5: | ||
<option>All Characters</option> | <option>All Characters</option> | ||
</select> | </select> | ||
var charList = 2; | |||
<script> | <script> | ||
if($("#charSelect").length <= 3) { | if($("#charSelect").length <= charList.length + 3) { | ||
var series = []; | var series = []; | ||
<!--{foreach from=$menu key=list item=data}--> | <!--{foreach from=$menu key=list item=data}--> | ||
Revision as of 05:56, 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>
var charList = 2;
<script> 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>


