Semantic-UI icon indicating copy to clipboard operation
Semantic-UI copied to clipboard

Anchor tag inside dropdown menu not working

Open jstejada opened this issue 12 years ago • 4 comments

Anchor tag inside dropdown menu is not working, it doesn't link to the href when clicked on.

jstejada avatar Dec 19 '13 03:12 jstejada

Could you fork this fiddle and give us an example?

http://jsfiddle.net/Vbr9d/42/

I'd be glad to help you figure this one out.

Unprofound avatar Dec 20 '13 18:12 Unprofound

@jstejada make sure you are not inserting anchor tag inside an anchor tag in the dropdown menu. Like if you are doing the following for dropdown menu

<a class="ui dropdown item">Dropdown
  <i class="dropdown icon"></i>
  <div class="menu ui transition hidden">
    <div class="item active">Action</div>
    <a href="#" class="item">Another action</a>
    <a href='#' class="item">Something else here</div>
  </div>
</a>

In this case the dropdown will not work because you are inserting an anchor tag inside another anchor tag. Correct HTML for dropdown with anchor tags is below:

<div class="ui dropdown item">Dropdown
  <i class="dropdown icon"></i>
  <div class="menu ui transition hidden">
    <div class="item active">Action</div>
    <a href="#" class="item">Another action</a>
    <a href='#' class="item">Something else here</div>
  </div>
</div>

rqbukhari avatar May 27 '15 23:05 rqbukhari

@rqbukhari Then how do I get the parent item linked? It's a common use case in nav menus. I spent hours trying to figure it out, is it not possible with Semantic-UI?

ameotoko avatar Jan 15 '17 22:01 ameotoko

i4umahesh avatar Apr 10 '20 23:04 i4umahesh