hide data-description option in msdropdown

228 views Asked by At

I am using msdropdown plugin from here

I build dropdown like this

var jsonData = [
            {
                text: "Facebook",
                value: 1,
               description: "Description with Facebook",
                image: "http://dl.dropbox.com/u/40036711/Images/facebook-icon-32.png"
            },
            {
                text: "Twitter",
                value: 2,

                description: "Description with Twitter",
                image: "http://dl.dropbox.com/u/40036711/Images/twitter-icon-32.png"
            }
            ];
var jsn = $("#byjson").msDropDown({byJson:{data:jsonData, name:'payments'}}).data("dd");

I want to hide description option when dropdown in displayed

How to do?

1

There are 1 answers

0
pumpkinzzz On

I think this plugin doesn't have an API for that, but you can easily ovverride with CSS

.ddcommon .ddChild{ height: auto !important; }
.ddcommon .ddChild li .description{ display: none; }
.ddcommon .ddChild li img{ float: none !important; }

check demo here: FIDDLE

ps: you need to hide only child description or the selected element too?