Menu Link In Mobile Version Not Working - Question | JoomShaper

Menu Link In Mobile Version Not Working

CB

Christoph Berz

Template 10 months ago

Hi,

I created the content for "KONTAKT" twice with page builder. One version is hidden in mobile version and one is hidden in the Laptop version. Both have the section iD: Kontakt

In the mobile version the linked item is not working.

Any idea?

Thanx Chris

0
10 Answers
Toufiq
Toufiq
Accepted Answer
Senior Staff 10 months ago #179356

Hi there,

Thank you for reaching out, and I apologize for any inconvenience caused by this oversight. Tried to check your issue. But, your website doesn't open here.

Best regards,

Toufiqur Rahman (Team Lead, Support)

0
CB
Christoph Berz
Accepted Answer
10 months ago #179389

Hi Toufiqur Rahman,

sorry, it went live in the meantime: www.doktorengels.de

0
Toufiq
Toufiq
Accepted Answer
Senior Staff 10 months ago #179446

Please check now and let me know. Thanks

0
CB
Christoph Berz
Accepted Answer
10 months ago #179645

Hi,

I tried on Android and IOS and and still does not work.

Thanx Chris

0
Toufiq
Toufiq
Accepted Answer
Senior Staff 10 months ago #179646

It works fine on my ios and android phone.

0
Atick Eashrak Shuvo
Atick Eashrak Shuvo
Accepted Answer
Support Agent 10 months ago #179650

Hi Chris,

It seems the issue is related to the fact that both the mobile and laptop versions of the "KONTAKT" section share the same section ID (Kontakt). In HTML, IDs must be unique, as they serve as specific identifiers for elements on a page. Having duplicate IDs can cause unexpected behavior, especially when linking to those sections, as the browser might not correctly identify which section to target.

To ensure the linked item works correctly across devices, you might need to update the setup so each version has a unique identifier. This avoids conflicts and ensures that links work seamlessly on both mobile and laptop versions.

If you need any help implementing the adjustments, feel free to let me know.

Best regards, Shuvo

0
CB
Christoph Berz
Accepted Answer
10 months ago #179655

Hi Shuvo,

thank you very much for your help. I totally understand why the issue happens now, but as I only have one menu (laptop and pc the same) I dont know how I can link that one menu item "Kontakt" to 2 different section IDs?

Can you help me to realieze that?

Thanx Chris

0
Atick Eashrak Shuvo
Atick Eashrak Shuvo
Accepted Answer
Support Agent 10 months ago #179675

Hi Chris,

Thank you for your response, and I’m glad the explanation helped clarify the issue.

To address your concern, it’s important to understand how hidden sections or elements work. When a section is hidden for a specific device, it doesn’t actually disappear from the DOM—it remains present but is simply not visible. Because of this, when you assign the same ID to multiple sections, the browser always targets the first occurrence of that ID in the DOM, regardless of its visibility. In your case, on the desktop version, the first section with the ID Kontakt is visible, so the menu link works as intended. However, on the mobile version, the first section with the same ID is hidden, and the browser does not look for the next section with the same ID. This is why the link fails to work on mobile devices.

To resolve this issue, I recommend using a single section with one unique ID for both desktop and mobile designs. You can then hide or show individual elements within that section depending on the device, rather than creating entirely separate sections. This approach ensures that the ID remains unique while still allowing for customized designs for each device.

If you’d like assistance in implementing this, I’d be happy to help you further.

Best regards, Shuvo

0
CB
Christoph Berz
Accepted Answer
10 months ago #179695

Hi Shuvo,

thank you soo much for your help. The problem is fixed now! :)

Cheers Chris

0
Atick Eashrak Shuvo
Atick Eashrak Shuvo
Accepted Answer
Support Agent 10 months ago #179697

Hi Chris,

Thank you for the update! I’m glad to hear that the issue is resolved. I’ll go ahead and mark this as solved. Please feel free to reach out if you need any further assistance.

Best regards, Shuvo

0