开发者

Add image to collapsable content header

I'm following t开发者_开发技巧he collapsible content doc at - http://jquerymobile.com/demos/1.0a4.1/docs/content/content-collapsible.html

Is there a method of adding an image to the right, within the header field (in code below the header field is referenced by 'Test').

<div data-role="collapsible" data-collapsed="true">
        <h3>Test</h3><add image here>
    </div>

I can't seem to find anything in the docs.

Thanks for any help


  • Live Example: http://jsfiddle.net/xMbyP/3/
  • Example #2: http://jsfiddle.net/xMbyP/4/
  • Navbar idea: http://jsfiddle.net/5Y3qT/12/

HTML

<div data-role="page" id="home"> 
    <div data-role="content">
        <div data-role="collapsible">
            <h3>I'm a header</h3>
            <p>I'm the collapsible content.</p>
        </div>
        <div data-role="collapsible" data-collapsed="true">
            <h3>With Image <img src="http://jquerymobile.com/demos/1.0a4.1/docs/lists/images/us.png" alt="US Flag" /></h3><p>I'm another collapsible content.</p>
        </div>
    </div>
</div>


What about using two divs with left and right float inside main div?

<div data-role="collapsible" data-collapsed="true">
    <div style="float: left;"><h3>Test</h3><add image here></div>
    <div style="float: right;"><img src="parth/to/image.ext" /></div>
</div>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜