Page 1 of 1

How to delete an element from the Carousel ?

Posted: Sun Sep 22, 2013 3:12 am
by bahar.wadia

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.


How to delete an element from the Carousel ?

Posted: Sun Sep 22, 2013 5:06 am
by Alena Prykhodko

How to delete an element from the Carousel ?

Posted: Mon Sep 23, 2013 1:22 am
by bahar.wadia

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


How to delete an element from the Carousel ?

Posted: Mon Sep 23, 2013 1:34 am
by Alena Prykhodko

Replace list component name with carousel component name.


How to delete an element from the Carousel ?

Posted: Mon Sep 23, 2013 2:22 am
by bahar.wadia

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 ?


How to delete an element from the Carousel ?

Posted: Mon Sep 23, 2013 4:52 pm
by Kateryna Grynko

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.


How to delete an element from the Carousel ?

Posted: Sun Oct 06, 2013 9:44 pm
by bahar.wadia

Awesome !

That works nicely.