Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 65 lines (53 sloc) 2.455 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
f68dbe7 @hiroprotagonist Update README.md
authored
20 into this div. Ready. See the following HTML
21
641bedd @hiroprotagonist Update README.md
authored
22 ~~~
1aacf3c @hiroprotagonist Update README.md
authored
23 <a data-icon="plus" data-role="actionsheet">Open</a>
24 <div>
25 <a data-role="button" href="#">Action 1</a>
26 <a data-role="button" href="#">Action 2</a>
27 <a data-role="button" href="#">Action 3</a>
28 <br/>
29 <!-- This close button is optional. The widget also closes if you click or touch outside of the popup -->
30 <a data-role="button" data-rel="close" href="#">Cancel</a>
31 </div>
641bedd @hiroprotagonist Update README.md
authored
32 ~~~
f68dbe7 @hiroprotagonist Update README.md
authored
33
d8a88fc #4, toggle sheet assoication via html id
stefan authored
34 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
35
7240430 @hiroprotagonist readme
authored
36 <a data-role="actionsheet" data-sheet='sheet0'>Open</a>
d8a88fc #4, toggle sheet assoication via html id
stefan authored
37
7240430 @hiroprotagonist readme
authored
38 .... A lot a lot a lot markup in between ....
d8a88fc #4, toggle sheet assoication via html id
stefan authored
39
7240430 @hiroprotagonist readme
authored
40 <div id='sheet0'>
41 <h1>This is sheet0 speaking</h1>
42 </div>
cf92b9b @hiroprotagonist Update README.md
authored
43
7c47960 @hiroprotagonist Fade animation restored. Readme extended #28 close
authored
44 Adjust the fade animation
45 -------------------------
46 Just like you can change the look of the "Action Sheet" with CSS, you can change the animation via CSS.
47 The default CSS contains two different animations. "actionsheet-open/close-slideup" and actionsheet-open/close-fade.
48 The standard uses "actionsheet-open/close-slideup". If you like the fade animation better change the CSS
49 classes ".ui-actionsheet-animateIn" as also ".ui-actionsheet-animateOut".
50 Change the property"-webkit-animation-name" and "-moz-animation-name" accordingly.
51 Of course you can also use your own animations.
d8a88fc #4, toggle sheet assoication via html id
stefan authored
52
88a5436 @hiroprotagonist Feature lit
authored
53 Features
54 --------
55 * Easy to configure CSS3 based keyframe animations
56 * Popup content can be any HTML
57 * No js coding needed.
58 * Nice default look
1010782 @hiroprotagonist readme
authored
59
60 Hint
61 ----
1aacf3c @hiroprotagonist Update README.md
authored
62 If you are looking for a programmatic javascript approach take a look at this
1010782 @hiroprotagonist readme
authored
63 usefull plugin: https://github.com/jtsage/jquery-mobile-simpledialog
64
Something went wrong with that request. Please try again.