You can put ID or CLASS on any link to identify each one with your js code, and, let the href like this to get dynamic content
Fabien On Mon, May 21, 2012 at 4:50 PM, Ting-Yu Chou <[email protected]> wrote: > Yes, I knew it'd be ok if I set href to an anchor, but I need it to be a > query url and > get data from server. > > Any other suggestions? > > Thanks > > Faz於 2012年5月21日星期一UTC+8下午10時38分49秒寫道: >> >> Because of the '?' tab library detect a GET method, and looks like it >> prevents that. >> >> I tried >> >> <ul>class="nav nav-tabs"> >> <li class="active"><a href="#day">Hot</a></li> >> <li><a href="#week">Week</a></li> >> <li><a href="#month">Month</a></li> >> >> then, >> >> $(function () { >> $('.nav-tabs a[href="#tab=month"]').tab('**show'); >> }); >> >> and it works. >> >> Hope it's enough for you. >> >> Fabien >> >> >> >> On Mon, May 21, 2012 at 4:30 PM, Ting-Yu Chou wrote: >> >>> Hello, >>> >>> I am trying to active a tab dynamically from js: >>> >>> <ul>class="nav nav-tabs"> >>> <li class="active"><a href="?tab=day">Hot</a></li> >>> <li><a href="?tab=week">Week</a></li> >>> <li><a href="?tab=month">Month</a></**li> >>> >>> <script> >>> $(function () { >>> $('.nav-tabs a[href="?tab=month"]').tab('**show'); >>> }); >>> </script> >>> >>> But I still have tab "Hot" active, any ideas? >>> >>> # I created a fiddle <http://jsfiddle.net/v4wNa/>. >>> >>> Thank you >>> >> >>
