2012-04-03 61 views
2

我有一个常规的jquery移动对话框,在标题左边有一个默认的关闭按钮。我试图将关闭按钮更改为后退按钮,并同时给它一个后退图标(data-icon =“arrow-l”?我试着对下面的第一个标记进行一些更改,但结果是旧关闭按钮前面的一个空按钮,OK按钮(第二个标签)向左移动而不是停留在右侧。h1标签内的图像被推到按钮下方,但保持居中。更改jquery移动对话框标题中的默认关闭按钮?

<div data-role="header" class="header"> 
    <a class="ui-btn-left ui-btn ui-btn-up-a ui-btn-icon-notext ui-btn-corner-all ui-shadow" data-iconpos="notext" data-icon="arrow-l" href="#" title="back" data-theme="a"> 
    <a href="#" data-role="button" data-icon="check" data-rel="check" title="Ok"></a> 
      <h1><img src="<?= base_url(); ?>/branding/img/logo.png" height="20" /></h1> 
</div> 

回答

0

您可以添加数据近距BTN = “none” 和使用数据的rel = “背” 是这样的:

<div data-role="header" class="header" data-close-btn="none"> 
    <a href="#" data-role="button" data-icon="arrow-l" data-rel="back"> 
    <a href="#" data-role="button" data-icon="check" title="Ok"></a> 

    <h1><img src="<?= base_url(); ?>/branding/img/logo.png" height="20" /></h1> 
</div> 

工作fiddle 这是什么。 你的意思是?