bahar.wadia
Posts: 0
Joined: Wed Aug 07, 2013 2:05 am

How to delete an element from the Carousel ?

First, thank you for the recently updated documentation.

How can I get the index of the frame/element that is being shown ? I want to provide the user the ability to delete the element/frame that is being displayed/

Thank you for your help.

bahar.wadia
Posts: 0
Joined: Wed Aug 07, 2013 2:05 am

How to delete an element from the Carousel ?

I am not looking for answers to a list component. I am specifically looking for answers regarding the Carousel component ?

Can you please give me an example specific to the carousel.

Thanks

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

How to delete an element from the Carousel ?

Replace list component name with carousel component name.

bahar.wadia
Posts: 0
Joined: Wed Aug 07, 2013 2:05 am

How to delete an element from the Carousel ?

First, I tried

alert (Appery("mobilecarousel_7").find(":selected").index());

I get no alert. Very strange.

Then I tried

alert($(this).find("li:not([_tmpl=true])").index($(arguments[0].target).parents("li")));

I get -1

What am I missing ?

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

How to delete an element from the Carousel ?

Hi Bahar,

You can use the following code
codeAppery("mobilecarousel_1").carouselRoot.carousel('eachItem', function(e) {
if ($(Appery("mobilecarousel_1").carouselRoot.carousel('getFrame', e)).hasClass("ui-carousel-active")) {
Appery("mobilecarousel_1").carouselRoot.carousel('remove', e);
}
});/code
where "mobilecarousel_1" is your Carousel component.

bahar.wadia
Posts: 0
Joined: Wed Aug 07, 2013 2:05 am

How to delete an element from the Carousel ?

Awesome !

That works nicely.

Return to “Issues”