Hamburger open change to cross for...

User 379556 Photo


Registered User
1,535 posts

Dick's queries are understandable because the procedure does look strange at first. In the items below, the hamburger's ID is (without the inverted commas) 'a', and the cross's is 'b'.

2. The hamburger's href will be #a, and the cross's will be #b. That is so that the one clicked on, being its own target, becomes display:none, revealing the other one.
4, 5, & 6. These are all 'To selected class(es)'. Doing step 3 will have set it that way, which is why I didn't think to mention this, but clearly I should have done. Because they both have a common class name, doing it either for the hamburger or for the cross will have the effect of doing it for both.

This toggling works well for the problem set in this thread (i.e. for changing a font icon in a navigation menu and not using JavaScript), but not as a general toggle, for which a tiny bit of JavaScript (as in Inger's first post in this thread) is easiest in SD.

Pure CSS toggling is generally done with the 'checkbox hack' (the search engines will lead to explanations of that), but doing that in SD without creating manually (within an HTML element) all or most of the three elements involved (checkbox, label and the element to be affected) seems tricky.

Frank
User 2924830 Photo


Registered User
160 posts

Wayans method shown in his video worked perfectly ....
User 1743776 Photo


Registered User
74 posts

Got it! It works great! After you cleared up my confusion, I got it to work for me and even began to play with Target in other ways.
Thanks.
i also did some Inger things and, of course, they work, too.
Live in a steady joy!

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.