Skip to content

Commit

Permalink
Toggle close button on mouseleave
Browse files Browse the repository at this point in the history
  • Loading branch information
mmistakes committed Apr 27, 2017
1 parent 66ce6c4 commit f0e3b62
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 5 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## Unreleased

### Bug Fixes

- Toggle close button on `mouseleave`. [#975](https://github.com/mmistakes/minimal-mistakes/issues/975)

## [4.4.1](https://github.com/mmistakes/minimal-mistakes/releases/tag/4.4.1)

### Enhancements
Expand Down
2 changes: 1 addition & 1 deletion assets/js/main.min.js

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion assets/js/plugins/jquery.greedy-navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ $(document).ready(function(){
$btn.attr("count", numOfItems - numOfVisibleItems);
if (numOfVisibleItems === numOfItems) {
$btn.addClass('hidden');
} else $btn.removeClass('hidden');
} else {
$btn.removeClass('hidden');
}
}

// Window listeners
Expand All @@ -64,6 +66,7 @@ $(document).ready(function(){
// Mouse has left, start the timer
timer = setTimeout(function() {
$hlinks.addClass('hidden');
$btn.toggleClass('close');
}, closingTime);
}).on('mouseenter', function() {
// Mouse is back, cancel the timer
Expand Down
8 changes: 7 additions & 1 deletion docs/_docs/18-history.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,15 @@ permalink: /docs/history/
excerpt: "Change log of enhancements and bug fixes made to the theme."
sidebar:
nav: docs
last_modified_at: 2017-04-21T19:59:55-04:00
last_modified_at: 2017-04-27T15:55:41-04:00
---

## Unreleased

### Bug Fixes

- Toggle close button on `mouseleave`. [#975](https://github.com/mmistakes/minimal-mistakes/issues/975)

## [4.4.1](https://github.com/mmistakes/minimal-mistakes/releases/tag/4.4.1)

### Enhancements
Expand Down
2 changes: 1 addition & 1 deletion docs/assets/js/main.min.js

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion docs/assets/js/plugins/jquery.greedy-navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ $(document).ready(function(){
$btn.attr("count", numOfItems - numOfVisibleItems);
if (numOfVisibleItems === numOfItems) {
$btn.addClass('hidden');
} else $btn.removeClass('hidden');
} else {
$btn.removeClass('hidden');
}
}

// Window listeners
Expand All @@ -64,6 +66,7 @@ $(document).ready(function(){
// Mouse has left, start the timer
timer = setTimeout(function() {
$hlinks.addClass('hidden');
$btn.toggleClass('close');
}, closingTime);
}).on('mouseenter', function() {
// Mouse is back, cancel the timer
Expand Down

0 comments on commit f0e3b62

Please sign in to comment.