title: data-toggle and data-target not working in bootstrap
body: <p>I am using bootstrap to develop a navbar and on that navbar there are two buttons one for login and other for sign up. I want that when user clicks login a modal pop up fires up and when signup is clicked the user to be redirected to another page. Below is my code but it seems to me that it is not working. I tried to use anchor tag and setting class to <code>btn btn-primary</code> but then the button becomes very large and <code>btn-sm</code> class has no effect on size.</p>
  
  <pre><code>&lt;div class="collapse navbar-collapse"&gt;
      &lt;ul class="nav navbar-nav navbar-right"&gt;
          &lt;li class="navbar-btn"&gt;&lt;button id="loginbutton" type="button" class="btn btn-primary"  data-target=".modal"&gt;&lt;i class="glyphicon glyphicon-log-in"&gt;&lt;/i&gt;Login&lt;/button&gt;&lt;/li&gt;
          &lt;li class=" navbar-btn"&gt;&lt;button type="button" class="btn btn-success"&gt;&lt;i class="glyphicon glyphicon-link"&gt;&lt;/i&gt;&lt;a href="./register.jsp"&gt;Create account&lt;/a&gt;&lt;/button&gt;&lt;/li&gt;
      &lt;/ul&gt;
  &lt;/div&gt;
  &lt;!-- Modal --&gt;
  &lt;div id="login" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"&gt;
      &lt;div class="modal-header"&gt;
          &lt;button type="button" class="close" data-dismiss="modal" aria-hidden="true"&gt;×&lt;/button&gt;
          &lt;h3&gt;Login&lt;/h3&gt;
      &lt;/div&gt;
      &lt;div class="modal-body"&gt;
          &lt;form class="form-horizontal" role="form" action="login" method="post"&gt;
              &lt;div class="form-group"&gt;
                  &lt;label for="inputEmail3" class="col-sm-2 control-label"&gt;Email&lt;/label&gt;
                  &lt;div class="col-sm-10"&gt;
                      &lt;input name="email" type="email" class="form-control" id="inputEmail3" placeholder="Email"&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
              &lt;div class="form-group"&gt;
                  &lt;label for="inputPassword3" class="col-sm-2 control-label"&gt;Password&lt;/label&gt;
                  &lt;div class="col-sm-10"&gt;
                      &lt;input name="password" type="password" class="form-control" id="inputPassword3" placeholder="Password"&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
              &lt;div class="form-group"&gt;
                  &lt;div class="col-sm-offset-2 col-sm-10 pull-right"&gt;
                      &lt;button type="submit" class="btn btn-default"&gt;Sign in&lt;/button&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
          &lt;/form&gt; 
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>