Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bootstrap Button Link Not Working

Bootstrap Button Link Not Working see code below:

<ul>
  <li>
      <a href="home.aspx?Id=146">
            <button class="btn btn-primary btn">Button Link</button>             
      </a>
 </li>
</ul>

I use firebug for development, is there an easy place to see what javascript events are attached and to which objects such as this button class? find it hard to debug as don't know what code is being called and on what events for bootstrap and other external js files

like image 835
user3231982 Avatar asked Sep 20 '25 07:09

user3231982


2 Answers

Or, you can just use a link which looks like a button..

<a href="home.aspx?Id=146" class="btn btn-primary">Button Link</a>
like image 62
Zim Avatar answered Sep 22 '25 21:09

Zim


Remove a tag and add window.location.href to button onclick

<button class="btn btn-primary btn" 
        onclick="window.location.href='home.aspx?Id=146'; return false;">
        Button Link
</button>
like image 34
zzlalani Avatar answered Sep 22 '25 21:09

zzlalani