Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt; &lt;head&gt; &lt;title&gt;&lt;/title&gt; &lt;script src="Scripts/jquery-1.7.1.min.js" type="text/javascript"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="Scripts/jquery-ui-1.8.16.min.js"&gt;&lt;/script&gt; &lt;!-- &lt;script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js"&gt;&lt;/script&gt;--&gt; &lt;script type="text/javascript"&gt; $(document).ready(function () { var dominoesHtml = $('.nav').clone().html(); $('.story div').hide(); $('.domino0 a').live('click', function (event) { var obj = $(this).parent(); $('#dominoes .nav ul li').removeClass('selected', 500); obj.switchClass('domino0', 'selected', 250); $('.domino1').switchClass('domino1', 'domino0', 10); $('.domino2').switchClass('domino2', 'domino1', 10); $('.domino3').switchClass('domino3', 'domino2', 10); $('.domino4').switchClass('domino4', 'domino3', 10); obj.addClass('domino4'); obj.removeClass('selected', 250); event.preventDefault(); }); $('button#btnReset').click(function () { $('.nav').html(dominoesHtml); }); }); &lt;/script&gt; &lt;style type="text/css"&gt; body { padding: 10px; } #dominoes { padding: 0px; width: 620px; position: relative; background-color: #eee; } #dominoes .nav ul { list-style: none; margin: 0px; padding: 0px; position: relative; } #dominoes .nav ul li { display: block; position: absolute; width: 113px; top: 0px; } .domino0 { left: 0px; z-index: 1000; } .domino1 { left: 30px; z-index: 98; } .domino2 { left: 60px; z-index: 96; } .domino3 { left: 90px; z-index: 94; } .domino4 { left: 120px; z-index: 92; } .was0 { background-color: red; } .was1 { background-color: purple; } .was2 { background-color: blue; } .was3 { background-color: green; } .was4 { background-color: yellow; } #dominoes .nav ul li.hovered { padding-left: 50px; } #dominoes .nav ul li.selected { left: 506px; z-index: 1000; } .story { position: absolute; top: 250px; } button { position: absolute; top: 300px; } &lt;/style&gt; &lt;/head&gt; &lt;body&gt; &lt;div id="dominoes"&gt; &lt;div class="nav"&gt; &lt;ul&gt; &lt;li class="domino0 was0"&gt;&lt;a href="xxx"&gt; &lt;img src="http://dl.dropbox.com/u/27409695/images/domino.png" /&gt;q&lt;/a&gt;&lt;/li&gt; &lt;li class="domino1 was1"&gt;&lt;a href="xxx"&gt; &lt;img src="http://dl.dropbox.com/u/27409695/images/domino.png" /&gt;q&lt;/a&gt;&lt;/li&gt; &lt;li class="domino2 was2"&gt;&lt;a href="xxx"&gt; &lt;img src="http://dl.dropbox.com/u/27409695/images/domino.png" /&gt;q&lt;/a&gt;&lt;/li&gt; &lt;li class="domino3 was3"&gt;&lt;a href="xxx"&gt; &lt;img src="http://dl.dropbox.com/u/27409695/images/domino.png" /&gt;q&lt;/a&gt;&lt;/li&gt; &lt;li class="domino4 was4"&gt;&lt;a href="xxx"&gt; &lt;img src="http://dl.dropbox.com/u/27409695/images/domino.png" /&gt;q&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; &lt;button id="btnReset"&gt; Reset handlers &lt;/button&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload