animation.html 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  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. <select id="cc" class="easyui-combo" style="width:150px"></select>
  24. <script type="text/javascript">
  25. $(function(){
  26. changeAnimation('slide');
  27. });
  28. function changeAnimation(atype){
  29. $('#cc').combo('panel').panel({
  30. openAnimation:atype,
  31. closeAnimation:(atype=='show'?'hide':atype)
  32. });
  33. }
  34. </script>
  35. </body>
  36. </html>