English 中文(简体)
sen 铁丝网名单器和显示小组项目指数
原标题:sencha touch Carousel listerner and displaying item index on panel

I am creating a sencha-touch base carousel for displaying images, one at a time. On top of the Carousel is a dockedItem. In that I want to display the serial no of the image (i.e 1 of 5 etc.).

我无法确定哪些活动应当处理,或我应采用何种方法更新案文。

我正在使用“塞察”触线1.1。

这里是我的卡兹尔法典:

var carousel= new Ext.Carousel({  
     fullscreen: true,
     dockedItems: [{
         overlay: true,
         dock:  top ,
         xtype:  toolbar ,
         style:  opacity: 0.6; ,
         items:[{
            xtype:  button ,
            text: "Main menu",
          },
          { xtype:  spacer  },
          {
              text:   ,
              ui:  action ,
              listeners:
              { 
                onCreate : function () 
                  {
                     console.log(this.getActiveIndex().toString());
                     this.text=this.getActiveIndex().toString();
                     this.doLayout();
                  },
               }
            }
           ],
            listeners:
            { 
                launch : function () 
                {
                    console.log(this.getActiveIndex().toString());
                    this.text=this.getActiveIndex().toString();
                    this.doLayout();
                },
            }
        }, 
        {
            overlay: false,
            dock:  bottom ,
            xtype:  toolbar ,
            style:  opacity: 0.75; ,
            items: 
                {
                    html:  <img style="display: block; margin-left: auto; margin-right: auto;" alt="" src="images/options.png" onclick="return loadOptionPage();"> 
                }
        }],

     layout: card ,
     items:[
                    {
                            cls: "figure1 figure"  
                    }, 
                    {
                            cls: "figure2 figure"
                    },
                                    {
                                        cls: "figure3 figure"
                                    },
                                    {
                                        cls: "figure4 figure"
                                    },
                                    {
                                        cls: "figure5 figure"
                                    }
                                ],
                                listeners: {              
                                    cardswitch:              
                                    {                 
                                        fn: function()                 
                                        {                   
                                            //alert(this.getActiveIndex() );
                                            var indx=this.getActiveIndex();
                                            var str=  ;
                                            str="hello"+indx.toString();
                                            this.dockedItems.items[1].html="<div>"+str+"</div>";
                                            carousel.doComponentLayout();
                                            console.log(str);
                                            this.doLayout();
                                        }               
                                    },              
                                } 
        });
问题回答

使用





相关问题
Jquery Carousel Issues

I am using Jquery s Just Another Carousel plugin and I m having issues with something which I am not sure and because of this it s not working. I m using this plugin because I need fixed height rather ...

jQuery carousel - auto expand height

I have a functional vertical jquery carousel as i have tweaked and modified the script and example found here: http://sorgalla.com/projects/jcarousel/examples/static_vertical.html Instead of images, ...

jQuery image carousel - How can I repeat the images?

I ve written an image slideshow in jQuery that speeds up/down based on where the mouse is hovering over the images. I d like to have the images repeat as the slideshow ends. So the user scrolls ...

Autoplay for javascript moving boxes

Please go to : http://gati.simptome-remedii.ro/ . As you can see there is a carousel effect in the header and it goes forward and backwards once you click on the arrows or press left/right key . I ...

Weird behaviour on custom made jQuery slider

I thought it would be easy to create my own custom content slider with jQuery, and managed to create a decent one. Within the slider wrapper, I have a slider content and slider list. The slider is ...

creating a carousel with javascript?

I want to create a carousel where if the user press prev and next only the image and its associated text should be displayed. Like for first item that is Image1, This is Image1 text should be ...

div transparent background with ie

i try to use the carousel structure below carousel the problem is the background (link with description on left side) semi transparent and it works fine with opera,firefox,chrome,safari except ie6. ...

热门标签