Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 57 lines (44 sloc) 2.04 kb
1010782 @hiroprotagonist readme
authored
1 An iOS like action sheet for jQuery Mobile
2 ==========================================
3
4 What is it
5 ----------
6 A very easy to use and fully markup-driven action sheet
7
8 How To Use
9 ----------
10 * Clone this repository or download a tagged version. I suggest to use the
11 master branch but jqm 1.alpha and 1.beta may work better with v1.
12 * If you prefer "learning by doing" play around with pages contained in the
13 examples folder.
14 * If not;
15 Include actionsheet css and js to the first page of your application.
5eeff50 @hiroprotagonist Added little more documentation. Added a screenshot.
authored
16 Then simply place a HTML Element on the page you like to open the popup.
1010782 @hiroprotagonist readme
authored
17 A link tag for example. Add the data-role "actionsheet" to it. You can place it within
5eeff50 @hiroprotagonist Added little more documentation. Added a screenshot.
authored
18 the header as well as within the content. Both should work.
19 Now add a div directly following this link. Wrap all content you like to show in the popup
20 into this div. Ready. See the following HTML code for details.
d9998b1 @hiroprotagonist readme
authored
21
7240430 @hiroprotagonist readme
authored
22 <a data-icon="plus" data-role="actionsheet">Open</a>
23 <div>
cf92b9b @hiroprotagonist Update README.md
authored
24 <a data-role="button" href="#">Action 1</a>
25 <a data-role="button" href="#">Action 2</a>
26 <a data-role="button" href="#">Action 3</a>
27 <br/>
28 <!-- This close button is optional. The widget also closes if you click or touch outside of the popup -->
29 <a data-role="button" data-rel="close" href="#">Cancel</a>
7240430 @hiroprotagonist readme
authored
30 </div>
d9998b1 @hiroprotagonist readme
authored
31
d8a88fc #4, toggle sheet assoication via html id
stefan authored
32 Also you can use html ids to associate toggle and sheet. This way the sheet must not directly follow the toggle.
cf92b9b @hiroprotagonist Update README.md
authored
33
7240430 @hiroprotagonist readme
authored
34 <a data-role="actionsheet" data-sheet='sheet0'>Open</a>
d8a88fc #4, toggle sheet assoication via html id
stefan authored
35
7240430 @hiroprotagonist readme
authored
36 .... A lot a lot a lot markup in between ....
d8a88fc #4, toggle sheet assoication via html id
stefan authored
37
7240430 @hiroprotagonist readme
authored
38 <div id='sheet0'>
39 <h1>This is sheet0 speaking</h1>
40 </div>
cf92b9b @hiroprotagonist Update README.md
authored
41
1010782 @hiroprotagonist readme
authored
42 * If you like to change the in -out Animation you can do that by editing the keyframes in jquery.mobile.actionsheet.css
88a5436 @hiroprotagonist Feature lit
authored
43
d8a88fc #4, toggle sheet assoication via html id
stefan authored
44
88a5436 @hiroprotagonist Feature lit
authored
45 Features
46 --------
47 * Easy to configure CSS3 based keyframe animations
48 * Popup content can be any HTML
49 * No js coding needed.
50 * Nice default look
1010782 @hiroprotagonist readme
authored
51
52 Hint
53 ----
54 * If you are looking for a programmatic javascript approach take a look at this
55 usefull plugin: https://github.com/jtsage/jquery-mobile-simpledialog
56
Something went wrong with that request. Please try again.