Inline Show/Hide toggle between 2 divs

And as if you hadn’t got enough here is a neater jQuery version - http://www.deltadesign.co/inlinetest/inline-hideJQ.html

This relies on you adding a class to each parent div (the ones you wish to hide/show) of parent (as well as the class of hidden (to the initially hidden one) which you would define in your stylesheet as display:none).

You also need to add the class of button to each of the images that you want to click to show/hide the parent divs.

Then include the following in before end Body

<script src="http://code.jquery.com/jquery-2.1.4.min.js"></script>
<script>
$(document).ready(function(){
    $("img.button").click(function(){
        $("div.parent").toggleClass("hidden");
    });
});
</script>

D


freewaytalk mailing list
email@hidden
Update your subscriptions at: