- This topic has 20 replies, 3 voices, and was last updated 4 years, 4 months ago by
onalti.
-
AuthorPosts
-
August 21, 2018 at 12:01 am #655236
JANEK
Good afternoon,
I’m just wondering if theres a capacity to program another button to trigger the slideout menu. At the moment I’m using the slideout menu to to display a contact form and would like to use a button elsewhere on the site to trigger the slideout menu additionally to the primary navigation button.
Thanks in advance,
JanekAugust 21, 2018 at 8:04 am #655781David
StaffCustomer SupportHi there,
you can just wrap an anchor tag with the slideout-toggle class:
<span class="slideout-toggle"><a><!-- slideout toggle --></a></span>Then this CSS:
.slideout-toggle a:before { font-family: GeneratePress; }August 21, 2018 at 4:07 pm #656211JANEK
Well… that was relatively simple wasn’t it. I thought there might have been something else going on in the background. 🙂
Thanks for your help, David!
August 22, 2018 at 5:16 am #656658David
StaffCustomer Supportglad to be of help 🙂
October 4, 2018 at 4:09 pm #693758Colby
Glad i came across this, thanks for posting this.
Just wanted to add to this that the code above can be added to an Elementor Button Module, to get a button to trigger the slideout.From within the Button Module:
in the link field paste :
<!– slideout toggle –>in the class field paste:
slideout-togglein the custom css paste:
.slideout-toggle a:before {font-family: GeneratePress;}October 5, 2018 at 2:57 am #693988David
StaffCustomer SupportAwesome 🙂 thanks for sharing Colby.
January 7, 2019 at 6:25 am #775195Daniel
Hi, i’m trying to get this working but it doesn’t do anything, any ideas?
site: https://www.shensmithlaw.co.uk/ (in the header)
January 7, 2019 at 6:53 am #775336David
StaffCustomer SupportHi there,
it could be due to the JS not firing, the Ninja form code you have in the section column us showing an error, right click > inspect > console you will see the error. Try removing the ninja form code and see if the menu works.
January 7, 2019 at 3:49 pm #775729Colby
Hi Been following this thread. Just a quick question. What is this technique called? When you use a HTML comment structure “<!– slideout toggle –>” to invoke a JS interaction?
I’d like to read up on this and learn how this works but don’t know what to search for. Any infor woudl be appreciated, thanks!
January 7, 2019 at 5:13 pm #775778David
StaffCustomer SupportHi there,
so this is the HTML element:
<span class="slideout-toggle"><a><!-- slideout toggle --></a></span>The Javascript looks for an
<a>tag that is within a container carrying theslideout-toggleclass. The HTML comment is solely there as a filler and to identify its purpose for anyone looking over the code.January 7, 2019 at 5:38 pm #775797Colby
Ok, Gotcha. Thanks David.
January 7, 2019 at 5:39 pm #775798David
StaffCustomer SupportYou’re welcome
January 8, 2019 at 1:09 am #775971Daniel
I removed it, but still doesn’t seem to fire the menu for some reason!
January 8, 2019 at 6:18 am #776175David
StaffCustomer SupportDo you have the slideout navigation set to mobile only?
January 8, 2019 at 6:24 am #776177Daniel
D’oh! I didn’t know that was an option! Thanks
-
AuthorPosts
- The topic ‘Trigger Slideout Menu with secondary button’ is closed to new replies.