Skip to content

Instantly share code, notes, and snippets.

@fazen
Last active November 15, 2019 07:10
Show Gist options
  • Star 9 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save fazen/0f7685e5079450b0da024a5d24b63b54 to your computer and use it in GitHub Desktop.
Save fazen/0f7685e5079450b0da024a5d24b63b54 to your computer and use it in GitHub Desktop.
  1. Add class always-visitable to parent items you want to be visitable;

  2. Add this js code after the row if ( $(this).is(top_level_link) ) { :

if ($(this).parent().hasClass('always-visitable')) {
  $('<a class="hover-link"></div>')
    .attr('href', $(this).attr('href'))
    .on('click', function(e){ e.stopPropagation(); })
    .appendTo($(this));
}
  1. Add this css:
#main-header .et_mobile_menu .always-visitable {
  position: relative;
  /* this li is clickable. change ui accordingly! */
}
#main-header .et_mobile_menu .always-visitable .hover-link {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  /* leave some space so right area works. you decide how much */
  right: 60px;

  /* for debugging — delete */
  background-color: #ff0;
  opacity: 0.3;
}
@seona13
Copy link

seona13 commented Nov 29, 2018

You, my friend @fazen, are an absolute star! Thank you for improving my reputation with the marketing department. ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment