Pergunta

I am trying to place a button on a webform in which when I click on it a submenu will appear giving me other options to navigate on my application. Is there any way to do it? Can you place sample code please.

Foi útil?

Solução

try this: http://jsfiddle.net/MXkCb/

<input type="button" value="show more options" class="showmore"/> <div><ul> <li>option 1</li> <li>option 2</li> <li>option 3</li> <li>option 4</li> </ul></div>

$('.showmore').on('click', function(){ $('div').show("slow"); });

Outras dicas

In your view, try this:

@ { var cultureItems = LocOptions.Value.SupportedUICultures .Select(c => new SelectListItem { Value = c.Name, Text = c.TwoLetterISOLanguageName }) .ToList();

}

<li class="nav-item dropdown">
    <a class="nav-link dropdown-toggle waves-effect waves-light" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
      Dropdown title
    </a>

  <div class="dropdown-menu" aria-labelledby="navbarDropdown">
        
  @foreach (var culture in cultureItems)
  {
                                                
    <form id="selectLanguage" asp-controller="Home"
      asp-action="SetLanguage" asp-route-returnUrl="@Context.Request.Path"
     method="post" class="form-horizontal" role="form">
    <input class="dropdown-item  waves-effect waves-light" type="submit" name="culture" value="@culture.Value" />       
    </form>
  }
 </div>

</li>
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top