animation.html 1.1 KB

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