Skip to content

Instantly share code, notes, and snippets.

@rafael
Created October 20, 2008 18:16
Show Gist options
  • Save rafael/18127 to your computer and use it in GitHub Desktop.
Save rafael/18127 to your computer and use it in GitHub Desktop.
var timeout_setter=0;
var hideExpandableClassElements = function (){
var allPageTags=document.getElementsByTagName("*");
//Cycle through the tags using a for loop
for (i=0; i<allPageTags.length; i++) {
//Pick out the tags with our class name
if (allPageTags[i].className=="entry-content notfirst") {
//Manipulate this in whatever way you want
allPageTags[i].style.display='none';
}
}
}
function ttt(element){
$('content_'+element.id).show();
clearTimeout(timeout_setter);
}
var aaa = function(element){
timeout_setter= setTimeout("hideExpandableClassElements()" ,300);
}
window.onload = function() {
// Find all elements that use that given CSS class
$$('.expandable').each(function(e) {
e.observe('mouseover', ttt.curry(e));
e.observe('mouseout',aaa);
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment