title: Change the bootstrap tab url when click on tab using codeigniter base_url
body: <p>On bootstraps tabs I would like to be able to change the url when I click on the tab.</p>
  
  <p>Each tab has it's own href using codeigniter base_url, currently I use the <code>data-target=""</code> to change the tab but I need to be able to change the url as well</p>
  
  <blockquote>
    <p><strong>Question:</strong> How can I change the url when I click on the bootstrap tab with out <code>#</code> because I use <code>data-target=""</code></p>
  </blockquote>
  
  <p>If I click on edit tab should change the url to </p>
  
  <p><code>http://project.com/user/1/edit</code></p>
  
  <pre><code>&lt;div class="row"&gt;
  &lt;div class="col-lg-12 col-md-12 col-sm-12 col-xs-12"&gt;
  &lt;ul class="nav nav-tabs" role="tablist"&gt;
      &lt;?php if ($page == 'profile') {?&gt;
      &lt;li role="presentation" class="active"&gt;
      &lt;a href="&lt;?php echo base_url('user/' .$user_id. '/profile');?&gt;" aria-controls="profile" role="tab" data-toggle="tab" data-target="#profile" aria-expanded="false"&gt;Profile&lt;/a&gt;
      &lt;/li&gt;
      &lt;?php } else {?&gt;
      &lt;li role="presentation"&gt;
      &lt;a href="&lt;?php echo base_url('user/' .$user_id. '/profile');?&gt;" aria-controls="profile" role="tab" data-toggle="tab" data-target="#profile" aria-expanded="false"&gt;Profile&lt;/a&gt;
      &lt;/li&gt;
      &lt;?php }?&gt;
      &lt;?php if ($page == 'activity') {?&gt;
      &lt;li role="presentation" class="active"&gt;
      &lt;a href="&lt;?php echo base_url('user/' .$user_id. '/activity');?&gt;" aria-controls="messages" role="tab" data-target="#messages" data-toggle="tab"&gt;Activity&lt;/a&gt;
      &lt;/li&gt;
      &lt;?php } else {?&gt;
      &lt;li role="presentation"&gt;
      &lt;a href="&lt;?php echo base_url('user/' .$user_id. '/activity');?&gt;" aria-controls="messages" role="tab" data-target="#messages" data-toggle="tab"&gt;Activity&lt;/a&gt;
      &lt;/li&gt;
      &lt;?php }?&gt;
      &lt;?php if ($page == 'edit') {?&gt;
      &lt;li role="presentation" class="active"&gt;
      &lt;a href="&lt;?php echo base_url('user/' .$user_id. '/edit');?&gt;" aria-controls="settings" role="tab" data-target="#settings" data-toggle="tab"&gt;Settings&lt;/a&gt;
      &lt;/li&gt;
      &lt;?php } else {?&gt;
      &lt;li role="presentation"&gt;
      &lt;a href="&lt;?php echo base_url('user/' .$user_id. '/edit');?&gt;" aria-controls="settings" role="tab" data-target="#settings" data-toggle="tab"&gt;Settings&lt;/a&gt;
      &lt;/li&gt;
      &lt;?php }?&gt;
  &lt;/ul&gt;
  
  
  &lt;div class="tab-content"&gt;
      &lt;div role="tabpanel" class="tab-pane" id="profile"&gt;1&lt;/div&gt;
      &lt;div role="tabpanel" class="tab-pane" id="messages"&gt;2&lt;/div&gt;
      &lt;div role="tabpanel" class="tab-pane" id="settings"&gt;2&lt;/div&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>