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

Problem with markCurrentTree in megamenu #86

Closed
annaraiders opened this issue Dec 21, 2017 · 2 comments
Closed

Problem with markCurrentTree in megamenu #86

annaraiders opened this issue Dec 21, 2017 · 2 comments

Comments

@annaraiders
Copy link

annaraiders commented Dec 21, 2017

When using markCurrentTree true with megamenu structure

<li class="has-mega-menu"><a href="#">Mega 1</a>
      <ul class="mega-menu">
        <li>
          <div class="column-1-3">
            <h2>Heading 1</h2>
            <div class="mega-menu-sample-image">Image</div>
            <ul>
              <li><a href="#">Regular link</a></li>
              <li><a href="#">Regular link</a></li>
              <li><a href="#">Regular link</a></li>
              <li><a href="#">Regular link</a></li>
            </ul>
          </div>
          <div class="column-1-3">
            <h2>Heading 2</h2>
            <ul>
              <li><a href="#">Regular link</a></li>
              <li><a href="#">Regular link</a></li>
              <li><a href="#">Regular link</a></li>
            </ul>
            <h2>Heading 3</h2>
            <ul>
              <li><a href="#">Regular link</a></li>
              <li><a href="#">Regular link</a></li>
            </ul>
          </div>
          <div class="column-1-3">
            <h2>Heading 4</h2>
            <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
            <ul>
              <li><a href="#">Regular link</a></li>
              <li><a href="#">Regular link</a></li>
            </ul>
          </div>
        </li>
      </ul>
    </li>

it is throwing javascript error TypeError: $(...).dataSM(...) is undefined

@vadikom
Copy link
Owner

vadikom commented Dec 22, 2017

Thanks, was an actual bug!

@vadikom vadikom closed this as completed Dec 22, 2017
@jenlampton
Copy link

jenlampton commented Feb 6, 2019

This fix prevents the fatal error, but I have child links in a mega menu (along with other things), and the parent item is still not getting the current class added when I'm on a child page.

edit: I have opened a followup issue here: #94

vadikom added a commit that referenced this issue Jul 23, 2020
…de the sub menu

Update demos with Bootstrap 4.5.0
fix: Mouse input not detected correctly on Windows when pointer speed is set to any of the fastest 2 options and additionally "Enhance pointer precision" is unchecked
fix: Avoid Content Security Policy issue when valid JSON is used as "data-sm-options" value #88
fix: "showOnClick: true" should not affect collapsible mode behavior in any way
fix: Remove SHJS syntax highlighter source code from the repo
fix: Problem with markCurrentTree in megamenu #86
fix: Uncaught TypeError when clicking on items (that do not have a sub menu in certain cases) in collapsible mode
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

3 participants