Clear List

Simple way to create TODO app for web

Javascript API

Parameters

      Build list with HTML

      • Item creation,
      • works with HTML too!

      You need a single CSS file, jQuery and Clear List JS.

      <!DOCTYPE html>
      <html lang="en">
      <head>
        <title>Clear List: Getting Started</title>
        <link href="css/clearList.min.css" rel="stylesheet" media="screen">
      </head>
      <body>
        <script src="js/jquery.min.js"></script>
        <script src="js/clearList.min.js"></script>
      </body>
      </html>

      This is the basic structure:

      <ul id="myList" class="clearList">
        <li>First item</li>
        <li>Second item</li>
        <li>Third item</li>
      </ul>

      This is the basic structure:

      <script>
        $(function() {
          window.myList = (new clearList).init('#myList');
        });
      </script>

      Changing the default values:

      <script>
        $(function() {
          var params = {
            startHexColor:"565656"
            // Go on...
          };
          window.myList = (new clearList).init('#myList', params);
        });
      </script>

      All together

      <!DOCTYPE html>
      <html lang="en">
      <head>
        <title>Clear List: Getting Started</title>
        <link href="css/clearList.min.css" rel="stylesheet" media="screen">
      </head>
      <body>
        <ul id="myList" class="clearList">
          <li>First item</li>
          <li>Second item</li>
          <li>Third item</li>
        </ul>
      
        <script src="js/jquery.min.js"></script>
        <script src="js/clearList.min.js"></script>
        <script>
        $(function() {
          window.myList = (new clearList).init('#myList');
        });
        </script>
      </body>
      </html>

      Download or fork this project on GitHub.

      Fin. Vége.