animation.html 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>Combo Animation - jQuery EasyUI Demo</title>
  6. <link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
  7. <link rel="stylesheet" type="text/css" href="../../themes/icon.css">
  8. <link rel="stylesheet" type="text/css" href="../demo.css">
  9. <script type="text/javascript" src="../../jquery.min.js"></script>
  10. <script type="text/javascript" src="../../jquery.easyui.min.js"></script>
  11. </head>
  12. <body>
  13. <h2>Combo Animation</h2>
  14. <p>Change the animation type when open & close the drop-down panel.</p>
  15. <div style="margin:20px 0">
  16. <span>Animation Type:</span>
  17. <select onchange="changeAnimation(this.value)">
  18. <option>slide</option>
  19. <option>fade</option>
  20. <option>show</option>
  21. </select>
  22. </div>
  23. <div class="easyui-panel" style="width:100%;max-width:400px;padding:30px 60px;">
  24. <div style="margin-bottom:20px">
  25. <input id="cc" label="Animation:" labelPosition="top" style="width:100%;">
  26. </div>
  27. </div>
  28. <script type="text/javascript">
  29. $(function(){
  30. $('#cc').combo();
  31. changeAnimation('slide');
  32. });
  33. function changeAnimation(atype){
  34. $('#cc').combo('panel').panel({
  35. openAnimation:atype,
  36. closeAnimation:(atype=='show'?'hide':atype)
  37. });
  38. }
  39. </script>
  40. </body>
  41. </html>