Note that there are some explanatory texts on larger screens.

plurals
  1. POToggle in jquery div sliding out
    primarykey
    data
    text
    <p>I have made Jquery div sliding out inside a Slideshow. I have used this <a href="http://docs.jquery.com/UI/Effects/Slide" rel="nofollow">documentation</a> to build it up.</p> <p>If you look up <a href="http://tommywebdesigner.com/Albert/index.html" rel="nofollow">here</a> my case you can find the Jquery div sliding out inside the slideshow, if you click on the arrow, the dive comes out but i can not give the function that once the slide come out, it can get closed clicking on the <em>arrow back</em>.</p> <p>Probably there was an easier and better way to do that, this is the code i am using for that.</p> <p>How can i make my arrow-back working to close the div sliding out? If you think that there is a better way to achieve that, let me know.</p> <p>Hope the explanation is clear</p> <p>Thanks for your help</p> <pre><code> &lt;script&gt; $(document).ready(function() { $(".click").click(function () { $(".slideout").toggle("slide", {}, 100); $('.click').hide(); $('.back').toggle(); }); }); &lt;/script&gt; </code></pre> <p>My CSS Code:</p> <pre><code> .slideout { display: none; margin: 0px; width: 300px; height: 450px; background: url("img/rejilla.png") repeat scroll 0 0 transparent; position: absolute; z-index: 101; top:15px; -webkit-border-top-left-radius: 16px; -webkit-border-bottom-left-radius: 4px; -moz-border-radius-topleft: 16px; -moz-border-radius-bottomleft: 4px; border-top-left-radius: 16px; border-bottom-left-radius: 4px; opacity: 0.5; } .click { z-index: 102; left:-15px; position: absolute; top: 10px; z-index:102; } .back {float: right; position: absolute; z-index: 102; left: 285px; top: 15px; display: none;} </code></pre> <p>HTML Code</p> <pre><code>&lt;div id="slideshow"&gt; &lt;div id="example"&gt; &lt;img src="img/arrow.png" class="click" alt="arrow" width="50" height="100" /&gt;&lt;div class="slideout"&gt;bla bla bla&lt;/div&gt;&lt;img src="img/arrow-prev.png" class="back" alt="arrow" width="50" height="100" /&gt; &lt;div id="slides"&gt; &lt;div class="slides_container"&gt; &lt;a href="" title="Slide 1" target="_blank"&gt;&lt;img class="slide" src="img/slide-1.jpg" alt="slide-1" width="1020" height="450" /&gt;&lt;/a&gt; &lt;a href="" title="Slide 2" target="_blank"&gt;&lt;img class="slide" src="img/slide-2.jpg" alt="slide-2" width="1020" height="450" /&gt;&lt;/a&gt; &lt;a href="" title="Slide 3" target="_blank"&gt;&lt;img class="slide" src="img/slide-3.jpg" alt="slide-3" width="1020" height="450" /&gt;&lt;/a&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&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.
 

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