All Components

PanelBar / Animation effects

Animation Settings

Conversation History

  • Today
    • Jane King
    • Bob Fuller
    • Lynda Kallahan
    • Matt Sutnar
  • Yesterday
    • Stewart
    • Jane King
    • Steven
    • Ken Stone
  • Wednesday, February 01, 2012
    • Jane King
    • Lynda Kallahan
    • Todd
    • Bob Fuller
  • Tuesday, January 31, 2012
    • Emily Davolio
    • Matt Sutnar
    • Bob Fuller
    • Jenn Heinlein
  • Monday, January 30, 2012
    • Matt Sutnar
    • Joshua
    • Michael
    • Jenn Heinlein

HTML5/JavaScript 源码

<!DOCTYPE html>
<html>
 <head> 
  <title>Animation effects</title> 
  <meta charset="utf-8"> 
  <link href="../content/shared/styles/examples-offline.css" rel="stylesheet"> 
  <link href="../../styles/kendo.common.min.css" rel="stylesheet"> 
  <link href="../../styles/kendo.rtl.min.css" rel="stylesheet"> 
  <link href="../../styles/kendo.default.min.css" rel="stylesheet"> 
  <link href="../../styles/kendo.dataviz.min.css" rel="stylesheet"> 
  <link href="../../styles/kendo.dataviz.default.min.css" rel="stylesheet"> 
  <script src="../../js/jquery.min.js"></script> 
  <script src="../../js/kendo.all.min.js"></script> 
  <script src="../content/shared/js/console.js"></script> 
  <script>
        
    </script> 
 </head> 
 <body> 
  <a class="offline-button" href="../index.html">Back</a> 
  <div id="example"> 
   <div class="box"> 
    <h4>Animation Settings</h4> 
    <ul class="options"> 
     <li> <input id="toggle" name="animation" type="radio"> <label for="toggle">toggle animation</label> </li> 
     <li> <input id="expand" name="animation" type="radio" checked> <label for="expand">expand animation</label> </li> 
     <li> <input id="opacity" type="checkbox" checked> <label for="opacity">animate opacity</label> </li> 
    </ul> 
   </div> 
   <div class="demo-section k-content"> 
    <h4>Conversation History</h4> 
    <ul id="panelbar"> 
     <li class="k-state-active"> Today 
      <ul> 
       <li>Jane King</li> 
       <li>Bob Fuller</li> 
       <li>Lynda Kallahan</li> 
       <li>Matt Sutnar</li> 
      </ul> </li> 
     <li> Yesterday 
      <ul> 
       <li>Stewart </li> 
       <li>Jane King</li> 
       <li>Steven</li> 
       <li>Ken Stone</li> 
      </ul> </li> 
     <li> Wednesday, February 01, 2012 
      <ul> 
       <li>Jane King</li> 
       <li>Lynda Kallahan</li> 
       <li>Todd </li> 
       <li>Bob Fuller</li> 
      </ul> </li> 
     <li> Tuesday, January 31, 2012 
      <ul> 
       <li>Emily Davolio</li> 
       <li>Matt Sutnar</li> 
       <li>Bob Fuller</li> 
       <li>Jenn Heinlein</li> 
      </ul> </li> 
     <li> Monday, January 30, 2012 
      <ul> 
       <li>Matt Sutnar</li> 
       <li>Joshua</li> 
       <li>Michael</li> 
       <li>Jenn Heinlein</li> 
      </ul> </li> 
    </ul> 
   </div> 
   <script>
                $(document).ready(function() {
                    var original = $("#panelbar").clone(true);
                    original.find(".k-state-active").removeClass("k-state-active");

                    $(".configuration input").change( function() {
                        var panelBar = $("#panelbar"),
                            clone = original.clone(true);

                        panelBar.data("kendoPanelBar").collapse($("#panelbar .k-link"));

                        panelBar.replaceWith(clone);

                        initPanelBar();
                    });

                    var initPanelBar = function () {
                        $("#panelbar").kendoPanelBar({ animation: { expand: { effects: getEffects()}} });
                    };

                    var getEffects = function () {
                        return (($("#expand")[0].checked ? "expand:vertical " : "") +
                                ($("#opacity")[0].checked ? "fadeIn" : "")) || false;
                    };

                    initPanelBar();
                });
            </script> 
  </div>   
 </body>
</html>