Wednesday, September 20, 2017

jQuery Chosen Plugin

jQuery Chosen Plugin
HTML File:
<!DOCTYPE html>
<html lang="en" xmlns="">
    <meta charset="utf-8" />
    <link rel="stylesheet" href="" />
    <script src=""></script>
    <script src=""></script>
     var arrValues;
        $(document).ready(function () {
            $html = '<select  class="html-multi-chosen-select1" multiple="multiple" id="myselect">';
            $html += '<option value="1">one</option>';
            $html += '<option value="2">two</option>';
            $html += '<option value="3">three</option>';
            $html += '<option value="4">four</option>';
            $html += '</select>';
            $('.html-multi-chosen-select1').chosen({ width: "210px" });
            $("#btnRead").click(function () {
                var arrValues = $("#myselect").chosen().val();
                for (var i = 0, len = arrValues.length; i < len; i++) {
            $("#btnSetValue").click(function () {
    <div id="divMain"></div>
    <button type="button" id="btnRead">Read Values</button>
    <button type="button" id="btnSetValue">Set value 2</button><br>
    <label id="lblValues"></label>


No comments:

Post a Comment

Featured Post

Learn Azure OpenAI

  Azure OpenAI includes several types of model: GPT-4 models  are the latest generation of  generative pretrained  (GPT) models that can gen...

Popular posts