Small, short code snippets that other people may find useful. Do you have a good regex that you would like to share? Share it! Even better, the code can be commented on, and improved.
OK, I was just working on a new site and I thought of this little neat javascript. It's not complex in the least, but could be useful to someone. I'm not sure if it's been done before.
How it works is whenever someone mouses over a link, this help bar will display information relative to that link.
<html>
<head>
<title>Helpbar</title>
<script type="text/javascript">
<!--
function helpBar(text)
{
document.getElementById("info").innerHTML = '<p>'+text+'</p>';
}
function clearHelpBar()
{
document.getElementById("info").innerHTML = '<p>Move your mouse over any link to get useful information.</p>';
}
//-->
</script>
</head>
<body>
// somewhere on the page
<div id="info" style="height: 30px; width: 500px;"><p>Move your mouse over any link to get useful information.</p></div>
<a href="testlink.html" onMouseOver="helpBar('This is just a test link!');" onMouseOut="clearHelpBar();">Test Link</a>
</body>
</html>
Simple, but neat.
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.