PureJSCarousel
Pure JavaScript carousel plugin (touch enabled && responsive)
Install / Use
/learn @vadymshymko/PureJSCarouselREADME
PureJSCarousel
:warning: PureJSCarousel is no longer maintained. If you need something like this in project that use react, please see react-simply-carousel
Pure JavaScript carousel plugin (responsive)
Demo: https://vadymshymko.github.io/portfolio/purejscarousel/
Browser support
| Chrome | IE | Firefox | Safari | Opera | iOS | Android | :-------: | :---: | :--------: | :-------: | :------: | :----: | :--------: | + | 9+ | + | + | + | 4+ | 4.3+
Getting Started
1. Include PureJSCarousel files
<!-- stylesheet -->
<link rel="stylesheet" href="path/to/purejscarousel.css">
<!-- js -->
<script src="path/to/purejscarousel.js"></script>
2. Set up your HTML
<div class="your-selector-for-carousel">
<div class="your-selector-for-carousel-slide"> Your Content </div>
<div class="your-selector-for-carousel-slide"> Your Content </div>
<div class="your-selector-for-carousel-slide"> Your Content </div>
<div class="your-selector-for-carousel-slide"> Your Content </div>
<div class="your-selector-for-carousel-slide"> Your Content </div>
<div class="your-selector-for-carousel-slide"> Your Content </div>
<div class="your-selector-for-carousel-slide"> Your Content </div>
...
</div>
3. Call the PureJSCarousel
var yourVariable = new PureJSCarousel({
carousel: '.your-selector-for-carousel',
slide: '.your-selector-for-carousel-slide'
});
3.1 Options
Option | Type | Default ------ | ---- | ------- carousel | string (CSS selector) | n/a slide | string (CSS selector) | n/a btnNext | string (CSS selector) | document.createElement('button') btnPrev | string (CSS selector) | document.createElement('button') oneByOne | boolean | false speed | int | 1000 delay | int | 0 effect | string | 'linear' autoplay | boolean | false autoplayDelay | int | 1000 autoplayStartDelay | int | autoplayDelay autoplayDirection | string | 'next' infinite | boolean | false
3.2 Methods
Go to next slide: yourVariable.goToNext();
Go to prev slide: yourVariable.goToPrev();
Go to slide: yourVariable.goTo(slideIndex);
Update carousel: yourVariable.update();
Disable carousel control: yourVariable.disableControl();
Enable carousel control: yourVariable.enableControl();
Destroy: yourVariable.destroy();
Start autoplay: yourVariable.startAutoplay(autoplayDirection);
Stop autoplay: yourVariable.stopAutoplay();
Related Skills
node-connect
347.0kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
107.8kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
347.0kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
347.0kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
