this is what i want to achieve.
but this is what i have:
<!-- master image -->
<div class="ba b--black-20 ph2 pv3 cf pointer">
<span>What is a master image?</span>
<svg width="17" height="10" viewBox="0 0 17 10" class="fr open-box">
<path d="M8.485 7.142l7.07-7.07 1.416 1.413L8.487 9.97l-.707-.707L0 1.485 1.414.07l7.07 7.072z" fill="#213543" fill-rule="evenodd" fill-opacity=".7"></path>
</svg>
<svg width="17" height="10" viewBox="0 0 17 10" class="fr close-box closeInfo">
<path d="M8.485 7.142l7.07-7.07 1.416 1.413L8.487 9.97l-.707-.707L0 1.485 1.414.07l7.07 7.072z" fill="#213543" fill-rule="evenodd" fill-opacity=".7"></path>
</svg>
<div class="pa2 open-info">
<span class="measure">
A master image is any image used by imgix to create and deliver derivative images. You can store master images in an Amazon S3 bucket, a web folder on your website, or any other addressable web storage location that you control.
</span>
</div>
</div>
<!-- derivative image -->
<div class="ba b--black-20 ph2 pv3 cf pointer">
<span>What is a derivative image?</span>
<svg width="17" height="10" viewBox="0 0 17 10" class="fr open-box">
<path d="M8.485 7.142l7.07-7.07 1.416 1.413L8.487 9.97l-.707-.707L0 1.485 1.414.07l7.07 7.072z" fill="#213543" fill-rule="evenodd" fill-opacity=".7"></path>
</svg>
<svg width="17" height="10" viewBox="0 0 17 10" class="fr close-box closeInfo">
<path d="M8.485 7.142l7.07-7.07 1.416 1.413L8.487 9.97l-.707-.707L0 1.485 1.414.07l7.07 7.072z" fill="#213543" fill-rule="evenodd" fill-opacity=".7"></path>
</svg>
<div class="pa2 open-info">
<span class="measure">
A derivative image is created in response to an imgix request. We fetch a master image (either from your image location or from our caches) and process, transform, and format it to your specifications into the image that is delivered to your users. Each derivative can have multiple parameters assigned.
</span>
</div>
</div>
<!-- cost change -->
<div class="ba b--black-20 ph2 pv3 cf pointer">
<span>How will my costs change over time?</span>
<svg width="17" height="10" viewBox="0 0 17 10" class="fr open-box">
<path d="M8.485 7.142l7.07-7.07 1.416 1.413L8.487 9.97l-.707-.707L0 1.485 1.414.07l7.07 7.072z" fill="#213543" fill-rule="evenodd" fill-opacity=".7"></path>
</svg>
<svg width="17" height="10" viewBox="0 0 17 10" class="fr close-box closeInfo">
<path d="M8.485 7.142l7.07-7.07 1.416 1.413L8.487 9.97l-.707-.707L0 1.485 1.414.07l7.07 7.072z" fill="#213543" fill-rule="evenodd" fill-opacity=".7"></path>
</svg>
<div class="pa2 open-info">
<span class="measure">
Our pricing is designed to grow with you in a way that is easy to understand and predict. You can create as many derivative variations of an image as you need (and use as many parameters per derivative as you want), at no extra cost. We charge for the bandwidth to deliver derivatives to your customers, but not to create them. This means your costs do not change if you suddenly need a new image size or want to take advantage of more features in imgix.
</span>
</div>
</div>
</div>
That’s the html, i’m using tachyons css
now i have two svgs one shows downward arrow, then on click it hides and shows up a second svg whic is an upward arrow just like the image.
here’s my Jquery:
$('.open-box').click(function() {
var $target = $(this).next('.open-info');
if ($target.not($target)) {
$('.open-box').show();
$('.close-box').hide();
$('.open-info').hide();
}
$target.slideToggle();
$('.close-box').show();
$('.open-box').hide();
});
But the open-info
div is not showing after clicking and things just don’t happen the way i want.
Please any help on this? if you don’t understand, let me know.
You can forget about ma html and do yours.