# Javascript image dropdown - By JSON data

# Javascript image dropdown Download

| Documentation

Click to create by json data
Source Code:

`

    <script>
    function createByJson() {
    	var jsonData = [
    					{description:'Choos your payment gateway', value:'', text:'Payment Gateway'},
    					{image:'../images/msdropdown/icons/Amex-56.png', description:'My life. My card...', value:'amex', text:'Amex'},
    					{image:'../images/msdropdown/icons/Discover-56.png', description:'It pays to Discover...', value:'Discover', text:'Discover'},
    					{image:'../images/msdropdown/icons/Mastercard-56.png', title:'For everything else...', description:'For everything else...', value:'Mastercard', text:'Mastercard'},
    					{image:'../images/msdropdown/icons/Cash-56.png', description:'Sorry not available...', value:'cash', text:'Cash on devlivery', disabled:true},
    					{image:'../images/msdropdown/icons/Visa-56.png', description:'All you need...', value:'Visa', text:'Visa'},
    					{image:'../images/msdropdown/icons/Paypal-56.png', description:'Pay and get paid...', value:'Paypal', text:'Paypal'}
    					];
    	var jsn = $("#byjson").msDropDown({byJson:{data:jsonData, name:'payments'}}).data("dd");
    }
    $("#btn1").on("click", createByJson);
    </script>

`