Searching for a script, which can do show/hide functions without framework.
Something like:
<span rel="toggle" href="/somelink.html">Title</span>
<div class="toggle">Hidden block</div>
.toggle { display: none; }
Block .toggle
should be displayed after clicking on span
. Like toggle()
on jQuery.
Thanks.
look here to create a getElementByClass function - http://www.dustindiaz.com/getelementsbyclass/
then something like this (haven't checked if it works, but you get the idea):
toggleItem = function(){
var item = getElementByClass('toggle')[0];
if (item.style.display == "block")
{
item.style.display = 'none';
}
else
{
item.style.display = 'block';
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With