html - Using dropdown button and Materialize -
i'm making website uses materialize. have following code:
<ul class="right hide-on-med-and-down"> <li><a class="dropdown-button" href="#" data-activates="login"><%= t('layouts.navbar_off.login') %><i class="mdi-navigation-arrow-drop-down right"></i></a></li> </ul>
and:
<ul id="login" class="dropdown-content"> <li><%= link_to t('layouts.navbar_off.like_school'), new_school_sessions_path %></li> <li class="divider"></li> <li><%= link_to t('layouts.navbar_off.like_student'), new_student_sessions_path %></li>
but when click in button, # added url. have refresh page , works fine.
how can solve problem?
did activate dropdown? know docs have if dynamically create them, had anyways. chalked weirdness angular integration, although experience refreshing seems familiar. docs:
$('.dropdown-button').dropdown({ induration: 300, outduration: 225, constrain_width: false, // not change width of dropdown of activator hover: true, // activate on hover gutter: 0, // spacing edge beloworigin: false // displays dropdown below button } );
Comments
Post a Comment