Skip to content

Instantly share code, notes, and snippets.

@tuki0918
Last active August 29, 2015 14:03
Show Gist options
  • Save tuki0918/7ab453f1f1296437e4e7 to your computer and use it in GitHub Desktop.
Save tuki0918/7ab453f1f1296437e4e7 to your computer and use it in GitHub Desktop.
hatenablog custom
<script type="text/javascript">
$(function(){
$(".keyword").each(function(){
var $keyword = $(this);
$keyword.before($keyword.text());
$keyword.remove();
});
});
</script>
<!-- scroll top -->
<style>
.scrolltop {
opacity: 0.3;
filter: alpha(opacity=30);
-moz-opacity: 0.3;
display: block;
position: fixed;
bottom: 30px;
right: 30px;
-webkit-transition: 0.2s linear;
-webkit-transition-property: all;
-moz-transition: 0.2s linear;
-moz-transition-property: all;
-o-transition: 0.2s linear;
-o-transition-property: all;
transition: 0.2s linear;
transition-property: all;
}
.scrolltop:hover {
opacity: 1;
filter: alpha(opacity=100);
-moz-opacity: 1;
}
</style>
<a href="#" class="scrolltop">
<img src="http://ueday.github.com/hatenablog/module/images/scrolltop_black.png" />
</a>
<script type="text/javascript">
$(function(){
$(".scrolltop").click(function(){
$('html,body').animate({ scrollTop: 0 }, 'slow','easeOutExpo');
return false;
})
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment