Skip to content

Instantly share code, notes, and snippets.

@onozaty
Created August 8, 2014 16:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save onozaty/80df5d82ff964abc1504 to your computer and use it in GitHub Desktop.
Save onozaty/80df5d82ff964abc1504 to your computer and use it in GitHub Desktop.
Slide sidebar by Redmine view customize plugin
$(function() {
$("#content")
.css({
"width": "auto",
"padding-right": "20px"
});
var sidebar = $("#sidebar");
var baseHeight = sidebar.height();
var baseWidth = sidebar.width();
sidebar
.css({
"background-color": "#EEEEEE",
"border": "1px solid #DDDDDD",
"padding": "5px",
"position": "absolute",
"right": "0",
"width": "5px",
"height": "5px",
"overflow": "hidden"
})
.append(
$("<div/>")
.css({
"border-bottom": "2px solid #AFAFAF",
"border-left": "2px solid #AFAFAF",
"position": "absolute",
"bottom": "3px",
"left": "3px",
"width": "5px",
"height": "5px"
})
)
.mouseover(function() {
$(this).stop().animate({
"padding": "5px 5px 15px 15px",
"width": baseWidth,
"height": baseHeight
});
})
.mouseout(function() {
$(this).stop().animate({
"padding": "5px",
"width": "5px",
"height": "5px"
});
});
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment