jquery移动对话框插件Mobile-SimpleDialog

https://github.com/jtsage/jquery-mobile-simpledialog

 

http://dev.jtsage.com/jQM-SimpleDialog/

<!DOCTYPE html>
<html>
<head>
    <title>simpledialog 插件应用程序</title>
    <meta name="viewport" content="width=device-width, 
      initial-scale=1.0, maximum-scale=1.0, user-scalable=0;" /> 
    <link href="Css/jquery.mobile-1.0.1.min.css" 
          rel="Stylesheet" type="text/css" />
    <link  href="Css/Css6.6/jquery.mobile.simpledialog.css" 
           rel="Stylesheet" type="text/css" />
    <script src="Js/jquery-1.6.4.js" 
          type="text/javascript"></script>
    <script src="Js/jquery.mobile-1.0.1.js" 
          type="text/javascript"></script>
	<script src="Js/Js6.6/jquery.mobile.simpledialog.js" 
           type="text/javascript"></script>
	<script type="text/javascript">
	    $(function() {
	        $("li a[data-transition='slideup']").each(function(index) {
	            $(this).bind("click", function() {
	                $(this).simpledialog({
	                    'mode': 'bool',
	                    'prompt': '您真的要删除所选择的记录吧?',
	                    'useModal': true,
	                    'buttons': {
	                        '确定 ': {
	                            click: function() {
	                                var $delId = "li" + index;
	                                $("#" + $delId).remove();
	                            }
	                        },
	                        '取消': {
	                            click: function() {
	                                //编写点击取消按钮事件
	                            },
	                            icon: "delete",
	                            theme: "c"
	                        }
	                    }
	                })
	            })
	        })
	    });
	</script>
</head>
<body>
<div data-role="page">
   <div data-role="header"><h1>对话框</h1></div>
   <div data-role="content">
     <ul data-role='listview' data-split-icon="delete" data-split-theme="c">
       <li id="li0"><a href="#">图书</a>
           <a href="#" data-transition="slideup">删除图书大类</a></li>
       <li id="li1"><a href="#">影视</a>
           <a href="#" data-transition="slideup">删除影视大类</a></li>
       <li id="li2"><a href="#">音乐</a>
           <a href="#" data-transition="slideup">删除音乐大类</a></li>
     </ul>
   </div>
   <div data-role="footer"><h4>©2012 rttop.cn studio</h4></div>
</div>
</body>
</html>

 

你可能感兴趣的:(jquery)