Saturday, April 6, 2013

jquery mobile sample 1–custom nav bar button icon

1.download free glyphish image from here: http://www.glyphish.com/download/glyphish-icons.zip

2.nav bar button code:

<a id="catalog-page-header-leftbtn" href="#catalog-page-left-panel" data-theme="d" data-icon="custom" data-iconpos="notext" data-shadow="false" data-iconshadow="false" class="ui-icon-nodisc">Open language panel</a>




3. css code:

#catalog-page-header-leftbtn,#catalog-page-header-leftbtn .ui-icon { 
width:42px;
height:21px;
}
#catalog-page-header-leftbtn .ui-icon {
background: url(./images/glyphish/139-flags.png) 0 0 no-repeat;
background-size: 42px 21px;
}




4. look like it:


image

No comments: