Threaded View

  1. #1
    Sencha User
    Join Date
    Dec 2010
    Posts
    11
    Vote Rating
    0
    DaveyJJ is on a distinguished road

      0  

    Default Answered: Final (I hope) Carousel example question

    Answered: Final (I hope) Carousel example question


    I have the following code working properly (which, for a designer, is good progress) and I need to link to an internal image within the Carousel and load that ... let's say, image 4 of row 3.

    I can make external links such as URLs and mailto etc open fine, but how do I load (and go directly to) a specific image?

    Code:
    html: [
         '<div>',
         '<img class="my-carousel-item-img" src="', category, '-', j, '.jpg" />',
         '<div id="external_link">',
         '<a href="http://www.google.com">Open external link</a>',
         '</div>',
         '<div id="internal_link">',
         '<a href="????????">Load image 4 of row 3</a>',
         '</div>',
         '</div>'
    ]
    Thanks for any help.

  2. So basically you need to add a listener to the link and do a setActiveItem on the carousel to the appropriate item, you will also need to stop the event...

    Code:
    carousel.element.on({
        scope : carousel,
        click  : function(e, t) {
            var target = e.getTarget('a');
    
            if (target) {
                e.stopEvent();
                this.setActiveItem(...);
            }
        }
    });
    Just typing from memory but something like that.

Thread Participants: 1

Tags for this Thread

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar