Hello,
I am new to ebase. Currently, my sub menu items will appear with hover effect and disappear when loses focus. Is there a way to make the sub menu items stay after clicked and disappear after clicked elsewhere?
Thanks in advance!!
Edwina
Make menu item stay after click?
Moderators: Jon, Steve, Ian, Dave
-
- Ebase User
- Posts: 24
- Joined: Fri Nov 04, 2016 7:41 pm
-
- Ebase User
- Posts: 8
- Joined: Mon Jan 14, 2013 9:49 am
showing selected submenus
Hi,
If i understand you correctly: this isn't directly possible through ebase with a simple click of a button, but you can leverage jQuery from within ebase and this might give you something like the result you want.
1. Add a jQuery library to your form(s)
see This Vault Snippet for an introduction for using jquery in ebase.
2. In the designer, with the form open, for each page that the menu appears right click on the page in the outline view and select "Html Element Properties" from the menu.
a) Give the page an id (or class) - e.g. 'MyPage'
b) Under the jQuery tab select click from the drop down and then in the code section (click on the ... button) add the following:
and press OK.
c) In the "Html Element Properties" dialog under the jQuery tab press the green + to add a new line, select ready from the dropdown and add the following:
I think this gives the results you are looking for, I haven't given it much of a test, but I hope it helps at least.
If i understand you correctly: this isn't directly possible through ebase with a simple click of a button, but you can leverage jQuery from within ebase and this might give you something like the result you want.
1. Add a jQuery library to your form(s)
see This Vault Snippet for an introduction for using jquery in ebase.
2. In the designer, with the form open, for each page that the menu appears right click on the page in the outline view and select "Html Element Properties" from the menu.
a) Give the page an id (or class) - e.g. 'MyPage'
b) Under the jQuery tab select click from the drop down and then in the code section (click on the ... button) add the following:
Code: Select all
// remove any previously selected blocks
$ebase("div.mymenu").find("ul.[class*='SubLevel'], [display='block']").css("display", "");
and press OK.
c) In the "Html Element Properties" dialog under the jQuery tab press the green + to add a new line, select ready from the dropdown and add the following:
Code: Select all
// this will make the sub menu appear after it has been selected
$ebase("div.mymenu").find("li.eb-ItemSelected").parents("ul.[class*='SubLevel']").css("display", "block")
I think this gives the results you are looking for, I haven't given it much of a test, but I hope it helps at least.
0 x
Dan
-
- Ebase User
- Posts: 24
- Joined: Fri Nov 04, 2016 7:41 pm
Who is online
Users browsing this forum: No registered users and 139 guests