Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Index

Methods

addSlide

  • addSlide(index: number, slides: string | HTMLElement | string[] | HTMLElement[]): void
  • Add new slides to the required index. slides could be HTMLElement or HTML string with new slide or array with such slides, for example:

    example
    addSlide(1, '<div class="swiper-slide">Slide 10"</div>')
    
    addSlide(1, [
     '<div class="swiper-slide">Slide 10"</div>',
     '<div class="swiper-slide">Slide 11"</div>'
    ]);
    

    Parameters

    • index: number
    • slides: string | HTMLElement | string[] | HTMLElement[]

    Returns void

appendSlide

  • appendSlide(slides: string | HTMLElement | string[] | HTMLElement[]): void
  • Add new slides to the end. slides could be HTMLElement or HTML string with new slide or array with such slides, for example:

    example
    appendSlide('<div class="swiper-slide">Slide 10"</div>')
    
    appendSlide([
     '<div class="swiper-slide">Slide 10"</div>',
     '<div class="swiper-slide">Slide 11"</div>'
    ]);
    

    Parameters

    • slides: string | HTMLElement | string[] | HTMLElement[]

    Returns void

prependSlide

  • prependSlide(slides: string | HTMLElement | string[] | HTMLElement[]): void
  • Add new slides to the beginning. slides could be HTMLElement or HTML string with new slide or array with such slides, for example:

    example
    prependSlide('<div class="swiper-slide">Slide 0"</div>')
    
    prependSlide([
     '<div class="swiper-slide">Slide 1"</div>',
     '<div class="swiper-slide">Slide 2"</div>'
    ]);
    

    Parameters

    • slides: string | HTMLElement | string[] | HTMLElement[]

    Returns void

removeAllSlides

  • removeAllSlides(): void
  • Remove all slides

    Returns void

removeSlide

  • removeSlide(slideIndex: number | number[]): void
  • Remove selected slides. slideIndex could be a number with slide index to remove or array with indexes.

    example
    removeSlide(0); // remove first slide
    removeSlide([0, 1]); // remove first and second slides
    removeAllSlides();    // Remove all slides
    

    Parameters

    • slideIndex: number | number[]

    Returns void

Generated using TypeDoc