Kwicks Example: Anchor Markup

While most of the examples use unordered lists for the markup, Kwicks only requires that panels be nested inside of a container element, regardless of which tags are used.

Demo

Source

<!DOCTYPE html>
<html>
    <head>
        <title>Kwicks Div Markup Example</title>

        <link rel='stylesheet' type='text/css' href='../jquery.kwicks.css' />
        <style type='text/css'>
            .kwicks {
                width: 515px;
                height: 100px;
            }
            .kwicks > a {
                height: 100px;
                /* overridden by kwicks but good for when JavaScript is disabled */
                width: 125px;
                margin-left: 5px;
                float: left;
            }

            #panel-1 { background-color: #53b388; }
            #panel-2 { background-color: #5a69a9; }
            #panel-3 { background-color: #c26468; }
            #panel-4 { background-color: #bf7cc7; }
        </style>
    </head>

    <body>
        <div class='kwicks kwicks-horizontal'>
            <a href='#' id='panel-1'></a>
            <a href='#' id='panel-2'></a>
            <a href='#' id='panel-3'></a>
            <a href='#' id='panel-4'></a>
        </div>

        <script src='js/jquery-1.8.1.min.js' type='text/javascript'></script>
        <script src='../jquery.kwicks.js' type='text/javascript'></script>

        <script type='text/javascript'>
            $(function() {
                $('.kwicks').kwicks({
                    maxSize : 250,
                    behavior: 'menu'
                });
            });
        </script>
    </body>
</html>