Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parent sub menu not clickable if other Html element exist inside it #6

Closed
Shaifullizam opened this issue Nov 30, 2022 · 3 comments
Closed

Comments

@Shaifullizam
Copy link

This work fine

<li class="hemenu-menu-level">
  <span>Recruitments</span>
  <ul class="">
  ...
  </ul>
</li>

But if add another element inside it or wrap the text with div or span like this

<li class="hemenu-menu-level">
  <span>
    <img src="image.jpg" />
    <span>Recruitments</span>
  </span>
  <ul class="">
  ...
  </ul>
</li>

the parent submenu is not clickable. Image and <span>Recruitments</span> not clickable except the right arrow.

My solution is to add css pseudo ::after to outer <span>
image

and add this css to kinda overlay those img and span element

content: "";
display: block;
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
@meceware
Copy link
Owner

Hi,

That works if that works :) Can you send a codepen link so I can investigate?

@Shaifullizam
Copy link
Author

@meceware
Copy link
Owner

meceware commented Dec 1, 2022

Hey, thanks for the codepen. I released v1.0.5 with image and other elements support and added a demo for it. To use it, hemenu-span class should be added. Let me know if you see any issues.

@meceware meceware closed this as completed Dec 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants