cmComboBox Demo

The select box below is empty onload and will be filled with options, loaded using AJAX.


HTML

Within the HTML code is a normal select box with identifier and a class for optical effects.
<select id="example" class="cmOptions"> <option value="">- select -</option> </select>

JavaScript

$(document).ready(function(){ $('select#example').ajaxOptions({ url: './data.php', async: true, selected: '2' }); });

HTML Includes

After loading jQuery you need to include the plugin and optional other used plugins.
For optical effects you can load the given plugin style.

<script type="text/javascript" src="//js.ceusmedia.com/jquery/cmOptions/0.2.js"></script> <script type="text/javascript" src="//js.ceusmedia.com/jquery/color.js"></script> <script type="text/javascript" src="//js.ceusmedia.com/jquery/cmBlitz/0.1.js"></script> <link rel="stylesheet" type="text/css" href="//js.ceusmedia.com/jquery/cmOptions/0.2.css"/>