Wijmo UI for the Web
Quick Start
Wijmo User Guide > Mobile Widgets > ListView > Quick Start

In this quick start, you'll learn how to add the ListView widget to an HTML project using HTML markup and jQuery script.

  1. To create a new HTML page in your favorite text editor, add the following code and save the document with an .html extension.

    Drop down and copy markup

    Paste in your favorite text editor.
    Copy Code
    <!DOCTYPE HTML>
    <HTML>
    <head>
    </head>
    <body>
    </body>
    </HTML>
    
  2. Add links to the dependencies to your HTML page within the <head> tags. Find the latest dependencies in the content delivery network (CDN) file at wijmo cdn.

    Drop down and copy references to paste inside the head tags

                
    References
    Copy Code
    <!--jQuery References-->
    <script src="http://code.jquery.com/jquery-1.11.1.min.js" type="text/javascript"></script>
    <script src="http://code.jquery.com/mobile/1.4.0/jquery.mobile-1.4.0.min.js" type="text/javascript"></script>
      
    <!--Theme-->
    <link href="http://cdn.wijmo.com/themes/1.4.0/moonlight-mobile/jquery-wijmo.css" rel="stylesheet" type="text/css" />
      
    <!--Wijmo Widgets CSS-->
    <link href="http://cdn.wijmo.com/jquery.wijmo-pro.all.3.20183.140.min.css" rel="stylesheet" type="text/css" />
      
    <!--Wijmo Widgets JavaScript-->
    <script src="http://cdn.wijmo.com/jquery.wijmo-open.all.3.20183.140.min.js" type="text/javascript"></script>
    <script src="http://cdn.wijmo.com/jquery.wijmo-pro.all.3.20183.140.min.js" type="text/javascript"></script>
  3. Add the following markup within the <body> tags to create the widget. The first <div> element creates the jQuery Mobile page, and the second one creates the JQM content area. The <ul> tags create the wijlistview widget.

    Drop down and copy markup to paste inside the body tags

                
    Markup
    Copy Code
    <div data-role="page"> 
        <div data-role="content"> 
            <ul data-role="listview" data-autodividers="true" data-theme="c"> 
                <li><a href="http://wijmo.com/docs/wijmo/webframe.html#Accordion.html">Accordion</a> </li>
                <li><a href="http://wijmo.com/docs/wijmo/webframe.html#BarChart.html">Barchart</a> </li>
                <li><a href="http://wijmo.com/docs/wijmo/webframe.html#BubbleChart.html">Bubblechart</a></li> 
                <li><a href="http://wijmo.com/docs/wijmo/webframe.html#Calendar.html">Calendar</a> </li>
                <li><a href="http://wijmo.com/docs/wijmo/webframe.html#Carousel.html">Carousel</a> </li>
            </ul> 
        </div> 
    </div>
  4. Within the <head> tags, below the references, add the following script to initialize the widget and populate it with data.

    Drop down and copy markup to paste inside the head tags

                
    Script
    Copy Code
    Type your example code here. It will be automatically colorized when you switch to Preview or build the help system.
  5. Save your HTML file and open it in a browser. The widget appears like the following.
See Also

Reference