Skip to content
Permalink
Browse files

Make the right arrow clickable to support intuitive usage

People were trying to click the right arrow in order to drop-down the
lines below it. While we do not support that yet, clicking on it now
brings the user to the page of the link and consequently show the hidden
options.
  • Loading branch information...
micgro42 committed Oct 10, 2016
1 parent d65126c commit dfe2cb3b0548d6aba57176769bc40f778f02972a
Showing with 29 additions and 0 deletions.
  1. +12 −0 script.js
  2. +17 −0 style.less
@@ -0,0 +1,12 @@
jQuery(function() {
'use strict';

jQuery('li.open, li.close').find('> div.li').each(function (index, element){
var link = jQuery(element).find('a').attr('href');
var $arrowSpan = jQuery('<span></span>').click(function (event) {
window.location = link;
});
$arrowSpan.addClass('arrowUnderlay');
jQuery(element).append($arrowSpan);
});
});
@@ -1,9 +1,23 @@
div.plugin__navi {
span.arrowUnderlay {
padding: 4px;
cursor: pointer;
}

&.none {
span.arrowUnderlay {
display: none;
}
}


&.left {
li.open { list-style-image: url(../../images/open.png); }
li.close { list-style-image: url(../../images/closed.png); }

span.arrowUnderlay {
display: none;
}
}

&.right {
@@ -14,5 +28,8 @@ div.plugin__navi {
background: no-repeat top right/0.8em url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUBAMAAAB/pwA+AAAAMFBMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABaPxwLAAAAD3RSTlMAAQIECiMlYWJ3psPc3v2CpcpnAAAARklEQVQIW2NgIAgUoLQBg9QVCIvjGUP8Xwcws/83A8d/sDCY6gcLg0kwHyoHEoBIgUSggiDh+VBjgMIwQZghYMB+hIF8AABJKyB+OnNcUQAAAABJRU5ErkJggg==);
}

span.arrowUnderlay {
float: right;
}
}
}

0 comments on commit dfe2cb3

Please sign in to comment.
You can’t perform that action at this time.