The List widget is created using a single <div> element, like in the following example.
Sample Markup |
Copy Code |
---|---|
<div id="list"> </div> |
You can initialize the wijlist with jQuery script like the following.
Sample Script |
Copy Code |
---|---|
<script type="text/javascript"> $(document).ready(function () { $("#list").wijlist({ }); var testArray = [{ label: 'c++', value: 'c++' }, { label: 'java', value: 'java' }, { label: 'coldfusion', value: 'coldfusion' }, { label: 'javascript', value: 'javascript' }]; var list = $("#list"); //Pass the array list to the wijlist widget list.wijlist('setItems', testArray); //Render the list in the client browser list.wijlist('renderList'); }); </script> |
The markup and script featured here results in the following: