Been trying to get slideToggle to close if already opened aka not reopen if already open. Searched all over for this function but to no avail. Any help would be much appreciated!
jQuery
<script>
$(document).ready(function() {
$(".shareLink").click(function(){
$(".hideShare").hide();
$("#"+$(this).attr('id')+'Box').slideToggle();
return false;
});
});
</script>
heres a link to it
http://digitalzu.net/jquery.html
Its not working because you are hiding all the
hideShareelements which includes the current box also so it just toggles.Try this, it will only hide its
siblings.Demo