Toggle Code View.
Posted In:
code
,
Javascript
.
By Sid
I spanked out some Javascript, very useful albeit simple. It just toggle my code windows, some of them look pretty ugly. Especially the one associated with my Xubuntu-DKU2 post.
So this is what it looks like:
function toggleVisibility(obj){
if (obj.style.display=="none")
obj.style.display="block";
else obj.style.display="none";
}
Toggle this code!
Add that function to your template and this to your blog entry after the code div.
<a href = "#" onclick="toggleVisibility(getElementById('your_div_element_id'))">Toggle the code!</a>
Toggle this code!
Don't forget you're div element's id should match the id in the link.
"I'll break your will,
I'll break you good,
I'll treat you like a brute."
Lordi - Who's Your Daddy?
0 Responses to Toggle Code View.
Something to say?