1
0
mirror of https://github.com/webslides/WebSlides.git synced 2025-08-21 12:21:46 +02:00

ID param is not longer needed

This commit is contained in:
Luis
2017-02-12 20:15:37 +01:00
parent c33af8e526
commit fc19ed4dea
2 changed files with 25 additions and 22 deletions

View File

@@ -228,6 +228,9 @@
<!-- OPTIONAL - svg-icons.js (fontastic.me - Font Awesome as svg icons) --> <!-- OPTIONAL - svg-icons.js (fontastic.me - Font Awesome as svg icons) -->
<script defer src="../static/js/svg-icons.js"></script> <script defer src="../static/js/svg-icons.js"></script>
<script type="text/javascript">
var slide = jQuery('#webslides').webslides();
</script>
</body> </body>
</html> </html>

View File

@@ -13,6 +13,7 @@ https://github.com/jennschiffer/SimpleSlides
jQuery.fn.webslides = function(options) { jQuery.fn.webslides = function(options) {
var obj = {}; var obj = {};
var $this = jQuery(this);
// Private vars // Private vars
var easing = 'swing'; var easing = 'swing';
@@ -52,7 +53,6 @@ jQuery.fn.webslides = function(options) {
*/ */
var init = function(_options) { var init = function(_options) {
obj.settings = { obj.settings = {
id : 'webslides',
class : 'slide', class : 'slide',
counter : 'counter', counter : 'counter',
navigation : 'navigation', navigation : 'navigation',
@@ -75,7 +75,7 @@ jQuery.fn.webslides = function(options) {
} }
var setup = function() { var setup = function() {
$slideshow = jQuery('#' + obj.settings.id); $slideshow = $this;
$navigation = jQuery('<div>').attr('id', obj.settings.navigation); $navigation = jQuery('<div>').attr('id', obj.settings.navigation);
$slides = $slideshow.children('section').addClass(obj.settings.class); $slides = $slideshow.children('section').addClass(obj.settings.class);
$firstSlide = $slides.first(); $firstSlide = $slides.first();