javascript - Adding class active to a known tab -
is possible add class active known tab in different page.
when navigate page 2 page 1 have make tab 2 active. have tab id me.
can 1 tell me should do?
my code
<div ng-repeat="t in data" class="time-tab-adspace" ng-class="{'tab-align-center':data.length==2}"> <a class="nav-people-tab text-hover" data-toggle="tab" ng-class="{'nav-people-tab-hover in':seltab=='ticket'+t.id}" ng-click="selecttab(t)"></a> </div>
in above code selected tab , css nav-people-tab-hover in
gets applied when click on it. when click on continue below controller button gets executed.
$scope.seltab= tselected; // here selected tab in page 2 $('#?????').addclass("active").show(); window.location.replace("page1");
in above code should write in ????? or piece of code inorder me work this?
Comments
Post a Comment