仅图标后退按钮jQuery Mobile [英] Icon only back button jQuery Mobile
本文介绍了仅图标后退按钮jQuery Mobile的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在我的jQuery Mobile页面中,我使用以下代码以编程方式将后退按钮设置为出现在不是第一页的每个页面上<div data-role="page" data-add-back-btn="true" id="anid">
的作用是创建一个后退按钮,其中包含文本以向后显示.但是我不希望我只想要图标.
Within my jQuery Mobile page I programmatically set up my back button to appear on every page that is not the first page by using the following code <div data-role="page" data-add-back-btn="true" id="anid">
what this does is create a back button that have text in it saying back. however I do not want that I want the icon only.
如何在jQuery Mobile中完成
How can this be done in jQuery Mobile
推荐答案
工作示例: http://jsfiddle.净/Gajotres/ygmWD/
$(document).on('pagebeforeshow', function () {
$.mobile.activePage.find(".ui-header a.ui-btn-left").addClass("ui-btn-icon-notext");
$.mobile.activePage.find(".ui-header a.ui-btn-left").removeClass("ui-btn-icon-left");
});
这篇关于仅图标后退按钮jQuery Mobile的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文