Setting custom icon with JavaScript. You would run this script on page load.
code
//'mobilenavbaritem2' is a same name as a name of item of navbar in 'Properties' tab
var item = $('[name=mobilenavbaritem2]');
// URL to image for icon
var image = "http://cdn3.iconfinder.com/data/icons/ellegant/64x64/9.png"
var cssObj = {// custom css for icon
'background': 'url("'+image+'") no-repeat transparent',
'background-size':'18px 18px',
'border-radius': '0px'
}
if (item.find('span.ui-icon').size()){
item.find('span.ui-icon').css(cssObj);
}else{
var $icon = $('<span class="ui-icon ui-icon-star ui-icon-shadow"></span>')
$icon.css(cssObj);
item.find('span.ui-btn-inner').append($icon);
}
/code
Example when using JavaScript:
http://tiggzi.com/view/ee26a0e7-303e-...
Setting custom icon with CSS (Project Create New... CSS).
code
a[name='mobilenavbaritem2'] .ui-icon-alert {
background: url("http://cdn3.iconfinder.com/data/icons/ellegant/64x64/9.png") no-repeat transparent;
background-size:18px 18px;
border-radius: 0px;
}
/code
a[name='mobilenavbaritem2'] contains same name as name of item of navbar in 'Properties' tab.
.ui-icon-alert is a type of icon that should be replaced. You need to set the actual icon in editor first.
Example using CSS:
http://tiggzi.com/view/ee26a0e7-303e-...