Created
April 6, 2012 16:18
-
-
Save cherenkov/2321084 to your computer and use it in GitHub Desktop.
jimdoで横並びメニューを作る方法を教えて下さい。現在はテンプ.. - 人力検索はてな http://q.hatena.ne.jp/1333685465
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
<style> | |
#header-menu { | |
margin-left: 310px; | |
margin-bottom: 30px; | |
} | |
#header-menu a { | |
text-decoration: none !important; | |
font-size: 20px; | |
color: black !important; | |
} | |
#header-menu a:hover { | |
font-size: 20px; | |
color: green !important; | |
} | |
</style> | |
<script type="text/javascript"> | |
//<![CDATA[ | |
(function() { | |
function createHeaderMenu() { | |
var div = document.createElement('div'); | |
div.id = 'header-menu'; | |
div.innerHTML = '<a href="#">深海魚</a> | <a href="#">カエル</a> | <a href="#">シュークリーム</a>'; | |
var c = document.getElementById('wrapper'); | |
c.parentNode.insertBefore(div, c); | |
} | |
var observer = function() { | |
setTimeout(function() { | |
if (document.getElementById('wrapper')) | |
createHeaderMenu(); | |
else | |
observer(); | |
}, 100); | |
}; | |
observer(); | |
})(); | |
//]]> | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment