//create msDropdown
var oDropdown = $("#element").msDropdown().data("dd");
//or by jsondata
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 oDropdown = $("#element").msDropdown({byJson:{data:jsonData, name:'payments'}}).data("dd");
//Some usefull parameters can be passed while creating msDropdown.
//These are default values.
{
{byJson: {data: null, selectedIndex: 0, name: null, size: 0, multiple: false, width: 250}, //if you want to created by json data
mainCSS: 'dd',
visibleRows: 7,
rowHeight: 0,
showIcon: true,
zIndex: 9999,
useSprite: false,
animStyle: 'slideDown',
event:'click', //it can be mouseover
openDirection: 'auto', //auto || alwaysUp
enableCheckbox:false, //this needs to multiple or it will set element to multiple
checkboxNameSuffix:'_mscheck',
append:'',
prepend:'',
on: {create: null,open: null,close: null,add: null,remove: null,change: null,blur: null,click: null,
dblclick: null,mousemove: null,mouseover: null,mouseout: null,focus: null,mousedown: null,mouseup: null} //event cant be added from here too
}
|