Download and set up
Vegas is a JavaScript library (v3) which adds beautiful animated background slideshows to your page body or any of its elements. A jQuery wrapper is available for backward compatibility.
Quickly get up and running with Vegas.
Install Vegas via NPM.
npm install vegas
Import Vegas in your JavaScript.
import vegas from 'vegas'; import 'vegas/dist/vegas.css';
import 'vegas/jquery'; import 'vegas/dist/vegas.css';
Include the CSS file.
<link rel="stylesheet" href="https://unpkg.com/vegas/dist/vegas.min.css">
For vanilla JS, include the IIFE script.
<script src="https://unpkg.com/vegas/dist/vegas.iife.min.js"></script>
For jQuery compatibility, include jQuery then the jQuery wrapper instead.
<script src="https://code.jquery.com/jquery.min.js"></script> <script src="https://unpkg.com/vegas/dist/jquery.vegas.min.js"></script>
Apply Vegas to body or any element.
vegas('#example', {
slides: [
{ src: '/img/slide1.jpg' },
{ src: '/img/slide2.jpg' },
{ src: '/img/slide3.jpg' },
{ src: '/img/slide4.jpg' }
]
}); $('#example').vegas({
slides: [
{ src: '/img/slide1.jpg' },
{ src: '/img/slide2.jpg' },
{ src: '/img/slide3.jpg' },
{ src: '/img/slide4.jpg' }
]
}); Read the Settings page for more information.
Don't waste your precious time, support is available for 24$. Ask your question and quickly receive a ZIP file with a clear running example with commented code and assets solving your problem.
Ask for Support