自定义动画和定位
自定义模态窗口样式,没有预定义的样式表!.
感谢网友Hero提供的方法
1- HEADER
<link href="/component_v1.0/moaModal-master/css/style.css" rel="stylesheet" type="text/css"> <script src="/component_v1.0/moaModal-master/js/Sweefty.js" type="text/javascript"></script> <script src="/component_v1.0/moaModal-master/js/moaModal.minified.js" type="text/javascript"></script> <script src="/component_v1.0/moaModal-master/js/extension.js" type="text/javascript"></script>
2- HTML
<div id="workbook" class="pf_work"><a href="#" class="workbook1"><img src="/main_style/img/work_book.jpg"></a></div> <div id="workbookQuery" class="block modal2"> </div>
3- Javascript
<script> $(document).ready(function() { $('.workbook1').modal({ target: '#workbookQuery', speed: 500, easing: 'easeOutBack', animation: 'right', position: '10% 50%', overlayClose: true, on: 'click' }); }); </script>
最后一个 例子Expand中不是就有关闭的方法,close : '.close'
$('.demo8').click(function(){ $('#demoModal2').modal('view',{ speed : 800, easing : 'easeInOutElastic', animation : 'top height width', position: '10% auto', overlayClose : false, on : 'click', overlayColor : '#ccc', overlayOpacity : .9, close : '.close' }); });