|
jqMobi中 Actionsheet 插件的使用
1.引入
- <script type="text/javascript" charset="utf-8" src="./plugins/af.actionsheet.js"></script>
复制代码
2.写对应的js
- <script>
- function showCustomHtmlSheet() {
- $("#afui").actionsheet('<a >Back</a><a onclick="alert(\'hi\');" >Show Alert 3</a><a onclick="alert(\'goodbye\');">Show Alert 4</a>');
- }
- function showCustomJsonSheet() {
- $("#afui").actionsheet(
- [{
- text: 'back',
- cssClasses: 'red',
- handler: function () {
- $.ui.goBack();
- }
- }, {
- text: 'show alert 5',
- cssClasses: 'blue',
- handler: function () {
- alert("hi");
- }
- }, {
- text: 'show alert 6',
- cssClasses: '',
- handler: function () {
- alert("goodbye");
- }
- }]);
- }
- </script>
复制代码
|
|