JSFiddle - React, Tailwind, and code Playground

by Jesse M

HTML

<link rel="stylesheet" href="http://rnld.ndmr.com/wp-content/plugins/nextgen-scrollgallery/scrollGallery/css/scrollGallery.css">
<link rel="stylesheet" href="http://rnld.ndmr.com/wp-content/themes/rnld/style.css">
<script src="http://rnld.ndmr.com/wp-content/plugins/nextgen-scrollgallery/scrollGallery/js/scrollGallery.js"></script>
<div id="scrollgallery_1" class="scrollgallery" style="width:100%;">
    <div class="scrollGalleryHead">
        <div id="imagearea_1" class="imagearea">
            <div class="imageareaContent">
                <img src="http://rnld.ndmr.com/wp-content/gallery/main/gallery-01.jpg" alt="" style="width:100%; height:auto; max-width:100%;"/>
                <img src="http://rnld.ndmr.com/wp-content/gallery/main/gallery-02.jpg" alt="" style="width:100%; height:auto; max-width:100%;"/>
                <img src="http://rnld.ndmr.com/wp-content/gallery/main/gallery-03.jpg" alt="" style="width:100%; height:auto; max-width:100%;"/>
                <img src="http://rnld.ndmr.com/wp-content/gallery/main/gallery-04.jpg" alt="" style="width:100%; height:auto; max-width:100%;"/>
                <img src="http://rnld.ndmr.com/wp-content/gallery/main/gallery-05.jpg" alt="" style="width:100%; height:auto; max-width:100%;"/>
                <img src="http://rnld.ndmr.com/wp-content/gallery/main/gallery-06.jpg" alt="" style="width:100%; height:auto; max-width:100%;"/>
                <img src="http://rnld.ndmr.com/wp-content/gallery/main/gallery-07.jpg" alt="" style="width:100%; height:auto; max-width:100%;"/>
                <img src="http://rnld.ndmr.com/wp-content/gallery/main/gallery-08.jpg" alt="" style="width:100%; height:auto; max-width:100%;"/>
                <img src="http://rnld.ndmr.com/wp-content/gallery/main/gallery-09.jpg" alt="" style="width:100%; height:auto; max-width:100%;"/>
            </div> 
        </div>
    </div>

    <div class="scrollGalleryFoot">
        <div id="thumb-nav-wrap">
            <div id="thumb-nav">           ...

JavaScript

// this is generated dynamically based on the settings that are saved in the plugin settings
window.addEvent('domready', function() {
    var scrollGalleryObj1 = new scrollGallery({
        start:0,
        area:200,
        thumbarea:"thumbarea_1",
        imagearea:"imagearea_1",
        speed:0.1,
        autoScroll:1,
        enableSwipeMode:1,
        diashowDelay:5				
		});
});

// This is where I'm having the trouble
$('previous').addEvent('click', function(e){
    e.preventDefault();
    
    // Here is where I was trying different variations of selectors
    scrollGalleryObj1.prev();
});