Created
October 20, 2008 18:16
-
-
Save rafael/18127 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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