Keep picture with Selectmenu of jQuery UI

后端 未结 4 1148
孤独总比滥情好
孤独总比滥情好 2021-01-26 12:38

I use jquery UI - Select Menu to build a List with picture. I follow this link and it\'s good. But When you select an item, just the text is copying, not the picture. I explain

4条回答
  •  醉酒成梦
    2021-01-26 12:53

    This solution run ok Here I've in item only text or only picture. Never both in same time.

    
    

    In each option, it's important have empty picture and text OR picture and " "

     
    
    .TFOOptlstFiltreImg
    {
    background-repeat:no-repeat;
    background-size: 24px 24px;
    width:100px;
    }
    .ui-widget
    {
    font-size: 1em;
    }
    .ui-selectmenu-menu .ui-menu.customicons .ui-menu-item
    {
    padding: 0.5em 0 0.5em 2.1em;
    background-repeat: no-repeat;
    }
    
    /*Agrandir sinin 16px par defaut*/
    .ui-selectmenu-menu .ui-menu.customicons .ui-menu-item .ui-icon
    {
        height: 24px;
        width: 24px;
        top: 0.1em;
    }
    

    Problem with this solution it's sometimes css of your span menu-button can be modify. Then better use method in other post , and add an object

提交回复
热议问题