Swipe between tabs items, onsen-ui -


I am using the onsen-UI (v1.14), and I am trying to swipe between tabs I'm messenger on Facebook, but I'm not able to work it out.

I have tried using the "setActiveTab" function with the on-price-detector, in many combinations, but none worked.

Here I've done (to the tool bar)

css

  .activebtn .ng-scope {color: blue; }  

html

  & lt; Ons-template id = "list.html" & gt; & Lt; Ons-toolbar var = "tb" & gt; & Lt; Div class = "center" & gt; & Lt; On-toolbar button class = "tbbtn" id = "btn_0" ng-click = "abc.setActiveCarouselItemIndex (0)" & gt; All & lt; / On-tool bar button & gt; & Lt; Online tool bar button class = "tbbtn" id = "btn_1" NG-Click = "abc.setActiveCarouselItemIndex (1)" & gt; People & lt; / On-tool bar button & gt; & Lt; Ons-toolbar-button class = "tbbtn" id = "btn_2" ng-click = "abc.setActiveCarouselItemIndex (2)" & gt; Subject & lt; / On-tool bar button & gt; & Lt; Online toolbar button class = "tbbtn" id = "btn_3" NG-Click = "abc.setActiveCarouselItemIndex (3)" & gt; Accounts & lt; / On-tool bar button & gt; & Lt; / Div & gt; & Lt; / On-toolbar & gt; & Lt; Ons-carousel style = "width: 100%; height: 100%" Auto scroll var = "abc" ng-controller = "ListCtrl" & gt; & Lt; On-carousel-item & gt; One ... & lt; / Ons-carousel-item & gt; & Lt; On-carousel-item & gt; B ... & lt; / Ons-carousel-item & gt; & Lt; On-carousel-item & gt; C ... & lt; / Ons-carousel-item & gt; & Lt; On-carousel-item & gt; D ... & lt; / Ons-carousel-item & gt; & Lt; / On-Carousel & gt; & Lt; / On-templates & gt;  

js

  app.controller ( 'ListCtrl', function ($ scope, $ http) {$ ( '# btn_0'). AddClass ( ' Aktivebtn '); Settimut (function () {Abskon (' Poschange ', function () {$ (' Tbbtn ') Kremoveclass (' Aktivebtn '); $ ('. # 'Btn_ + Abskgetaktivekrouselitemindeks ()) .addClass ('activebtn');});}, 400);});  

Comments

Popular posts from this blog

winforms - C# Form - Property Change -

javascript - amcharts makechart not working -

java - Algorithm negotiation fail SSH in Jenkins -