javascript - Uncaught Error: jQuery UI Tabs: Mismatching fragment identifier at Function.error -


dynamically created tabs, getting kind of error, don't mistake. tabindex is:

 -1 + activetab = ($('.nav-tabs .active').text() 

this last selected data.

<link rel="stylesheet" type="text/css" href="//code.jquery.com/ui/1.9.2/themes/base/jquery-ui.css"> <script type="text/javascript" src="//code.jquery.com/jquery-1.9.1.js"></script>  <div id="tabdiv">         <ul id="tabs" class="nav-tabs">             <li class="active">                 <a href="#1" onclick="getlist();" data-toggle="tab">all</a>             </li>         </ul>      </div>      <script>       function addtabs(result){          var unit = _.map(result,'unit');         unit = _.uniq(unit);         var tabs = $("#tabdiv").tabs();         (var = 0; < unit.length; i++) {           var ul = tabs.find( "ul" );           var current_idx = ul.find("li").length + 2; // correct index id            $("<li><a href=#"+current_idx+ " tabindex="+ul.find("li").length+" onclick=getlist(); data-toggle=tab>"+unit[i]+"</a></li>" ).appendto( ul ); onclick="getlist('wip_production');"           tabs.tabs("refresh")         }         $("</ul>" ).appendto(tabs );      }      </script>  <script> function getlist(){ var activetab = ($('.nav-tabs .active').text()); console.log(activetab) } </script> 


Comments

Popular posts from this blog

Sort a complex associative array in PHP -

vb.net - How to ignore if a cell is empty nothing -

recursion - Can every recursive algorithm be improved with dynamic programming? -