jquery-mobileprimefaces-mobile

data-icon is not rendering correctly


I am using jquery-mobile(v1.3.1) that comes with primefaces mobile(v 0.9.5-snapshot). When I try to add icon, I always see name mentioned in attribute "data-icon" will appear as shown in the below pic. How to get rid of it?

<a id="menuSwitcher" href="javascript:void(0)" data-role="button" data-iconpos="left" data-icon="back" onclick="WBUI.menuToggler($(this))" class="ui-btn-left ui-btn ui-shadow ui-btn-corner-all ui-btn-icon-left ui-btn-hover-a ui-btn-up-a" data-corners="true" data-shadow="true" data-iconshadow="true" data-wrapperels="span" data-theme="a" original-title=""> <span class="ui-btn-inner" original-title="">ToolBox</span></a>

enter image description here


Solution

  • Found out that the default icomoon css script (since I use it for other icons) has the following data attributes which I need to remove to avoid duplicate rendering.

    /* Use the following CSS code if you want to use data attributes for inserting your icons */
    [data-icon]:before
    {
        font-family: 'icomoon';
        content: attr(data-icon);
        speak: none;
        font-weight: normal;
        font-variant: normal;
        text-transform: none;
        line-height: 1;
        -webkit-font-smoothing: antialiased;
    }