Skip to content

Commit

Permalink
position sidebar with jquery
Browse files Browse the repository at this point in the history
  • Loading branch information
Phil Bayfield committed Mar 20, 2015
1 parent 69bf7ed commit 83a0106
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions js/theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ $(document).ready(function() {
});

// Side bar
$('#sidebar').css('top', $('#theImage').offset().top + 'px');
$('#info-link').click(function () {
var sidebar = $('#sidebar');
if (parseInt(sidebar.css('right')) < 0) {
Expand Down
4 changes: 3 additions & 1 deletion less/theme.less
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ body {

#sidebar {
position: absolute;
top: 350px;
right: -250px;
text-align: left;
.handle {
Expand All @@ -134,6 +133,9 @@ body {
a:hover {
color: #eee;
}
.glyphicon {
font-size: 1.2em;
}
}
.info {
float: right;
Expand Down
4 changes: 3 additions & 1 deletion theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ body {
}
#sidebar {
position: absolute;
top: 350px;
right: -250px;
text-align: left;
}
Expand All @@ -98,6 +97,9 @@ body {
#sidebar .handle a:hover {
color: #eee;
}
#sidebar .handle .glyphicon {
font-size: 1.2em;
}
#sidebar .info {
float: right;
background-color: #eeeeee;
Expand Down

0 comments on commit 83a0106

Please sign in to comment.