Note that there are some explanatory texts on larger screens.

plurals
  1. POToggle script need to be changed
    primarykey
    data
    text
    <p>I need to change this script so that I can click on my <code>slideshow-expand</code> down arrow button and have it toggle the height of the box up and down on click. Right now it works on the whole box click but I want it on the arrow because its a slide show and every time you click on the prev or next arrow it toggles the box height</p> <p>Here is the script:</p> <pre><code> $("#slideshow-box").click((function() { var i = 0; return function() { $(this).animate({ height: (++i % 2) ? 166 : 115 }, 200); } })()); }); </code></pre> <p>Here is the html:</p> <pre><code>&lt;div id="slideshow-box"&gt; &lt;div id="slideshow-stage"&gt; &lt;img src="images/slideshowimage.png"&gt; &lt;img src="images/slideshowimage2.png"&gt; &lt;img src="images/slideshowimage3.png"&gt; &lt;/div&gt; &lt;div id="slideshow-prev"&gt;&lt;/div&gt; &lt;div id="slideshow-next"&gt;&lt;/div&gt; &lt;div id="slideshow-expand"&gt;&lt;/div&gt; </code></pre> <p>and here is the css:</p> <pre><code>#slideshow-box { background-color:#CCC; position: absolute; top:129px; width:883px; height:115px; overflow:hidden; z-index:1; } #slideshow-stage { position: absolute; top:0; width:883px; height:115px; z-index:1; margin-left: auto; margin-right: auto; } #slideshow-stage&gt;img { position:absolute; left:0; top:0; } #slideshow-prev { position: absolute; top:40px; left:10px; background-image: url(images/arrows_left.png); background-repeat:no-repeat; width:22px; height:42px; opacity: .4; z-index:50; } #slideshow-prev:hover { opacity: 10; cursor:pointer; } #slideshow-next { position: absolute; top:40px; right:10px; background-image: url(images/arrows_right.png); background-repeat:no-repeat; width:22px; height:42px; opacity: .4; z-index:50; } #slideshow-next:hover { opacity: 10; cursor:pointer; } #slideshow-expand { background-image: url(images/arrows_down.png); background-repeat:no-repeat; width:28px; height:14px; position: absolute; bottom:10px; left:441px; opacity: .4; z-index:50; } #slideshow-expand:hover { position: absolute; bottom:10px; left:441px; opacity: 10; cursor:pointer; } </code></pre>
    singulars
    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.
 

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