Wijmo UI for the Web
Markup and Scripting
Wijmo User Guide > Widgets > Gallery > Markup and Scripting

The HTML markup for a wijgallery widget looks like this, a list of graphic images.

Markup
Copy Code
<div id="wijgallery">          
    <ul class="">
            <li class=""><a href="Images/sports1.png">
        <img alt="1" src="Images/sports1.png" title="Word Caption 1" />
    </a></li>
    <li class=""><a href="Images/sports2.png">
        <img alt="2" src="Images/sports2.png" title="Word Caption 2" />
    </a></li>
    <li class=""><a href="Images/sports3.png">
        <img alt="3" src="Images/sports3.png" title="Word Caption 3" />
    </a></li>
    <li class=""><a href="Images/sports4.png">
        <img alt="4" src="Images/sports4.png" title="Word Caption 4" />
    </a></li>
    <li class=""><a href="Images/sports5.png">
        <img alt="5" src="Images/sports5.png" title="Word Caption 5" />
    </ul>
</div>

You can initialize the widget with the following jQuery script.

Script
Copy Code
<script type="text/javascript">
    requirejs.config({
        baseUrl: "http://cdn.wijmo.com/amd-js/3.20162.99",
            paths: {
                "jquery": "jquery-1.11.1.min",
                "jquery-ui": "jquery-ui-1.11.0.custom.min",
                "jquery.ui": "jquery-ui",
                "jquery.mousewheel": "jquery.mousewheel.min",
                "globalize": "globalize.min"
            }
    });
</script>

<script id="scriptInit" type="text/javascript">
    require(["wijmo.wijgallery"], function () {
        $(document).ready(function () {
            $("#wijgallery").wijgallery({
                showCounter: false
            });
        });
    });
</script>

The markup and script featured here results in the following live widget. Mouse over the Gallery to see the animation.

See Also