PDA

View Full Version : Carousel with clickable items



tbleckert
18 Feb 2011, 7:01 AM
Ok hi!

I'm new to this one and I've tried this all day. I'm trying to do a carousel with items, the problem is that I want the items to be clickable. The carousel is a list of products and every product will have a product page, so I need to make the items clickable and when someone clicks it, it flips to show the product details.

Thanks in advance, such a beautiful framework!

Frances
18 Feb 2011, 7:41 PM
Hi tbleckert, have a look at the example "carousel 2" in the docs - it loads cards from a store. Then (and I'm guessing here) you should be able to add a listener "tap" function in the "items.push" function parameters.

Hope this helps
Cheers

kristalaz
19 Feb 2011, 9:24 AM
i have static items, so i used something like this:


var cardViewItem1 = {
style : 'background: url("img/background.png")',
title: "card",
html: '<div id="showCardCreate">lalala</div>',
listeners: {
click: {
element: 'body', //element: 'el', //bind to the underlying el property on the panel
fn: function(){
// HERE CAN YOUR NEW PANEL BE ACTIVATED
rootPanel.setActiveItem(learnPanel);
}
}
}
};


then added this elemts to the carusel

tbleckert
22 Feb 2011, 1:55 AM
Thanks guys for the answers!

I solved with a panel with card layout and multiple items representing pages with the first item as a carousel. Works great, not very dynamic though. Looking at the xml solution right now.

kristalaz
22 Feb 2011, 2:42 AM
If you find by ourself, please msg it here, i would also know how it works