Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6871197
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T03:46:33+00:00 2026-05-27T03:46:33+00:00

I’m using Ariel Flesler’s serialScroll script and would like to add a class to

  • 0

I’m using Ariel Flesler’s serialScroll script and would like to add a class to the active, or highlighted item so I can style it with CSS. Reading the documentation I discovered the notify trigger, but I’m not sure how / if it could be used to accomplish this.

This is my code:

jQuery

jQuery(function( $ ){

    $('#slideshow').serialScroll({
        items:'li',
        prev:'#screen2 a.prev',
        next:'#screen2 a.next',
        offset:-180,
        start: 0,
        duration:1200,
        force:true,
        stop:true,
        lock:false,
        cycle:false,
        jump: true
    });

});

HTML

    <div id="screen2">
    <div id="buttons">
        <a class="prev" href="#">Previous</a>
        <a class="next" href="#">Next</a>
        <br class="clear" />
    </div>
    <div id="slideshow">
        <ul>
            <li><img src="http://www.stockvault.net/data/s/113497.jpg" /></li>
            <li><img src="http://www.stockvault.net/data/s/100177.jpg" /></li>
            <li><img src="http://www.stockvault.net/data/s/101916.jpg" /></li>
            <li><img src="http://www.dreamstime.com/animal-steps-in-snow-thumb12853223.jpg" /></li>
            <li><img src="http://www.dreamstime.com/animal-eggs-thumb15876342.jpg" /></li>
            <li><img src="http://www.dreamstime.com/animal-cat-thumb15385101.jpg" /></li>
            <li><img src="http://www.dreamstime.com/green-nature-thumb596309.jpg" /></li>
            <li><img src="http://www.dreamstime.com/office-in-nature-thumb3256171.jpg" /></li>
            <li><img src="http://www.dreamstime.com/nature-tree-thumb16030502.jpg" /></li>
            <li><img src="http://www.dreamstime.com/gift-of-the-nature-thumb15977958.jpg" /></li>
            <li><img src="http://www.dreamstime.com/nature-abstract-thumb3615419.jpg" /></li>
            <li><img src="http://www.dreamstime.com/nature-path-in-forest-with-sunshine-thumb8241130.jpg" /></li>
            <li><img src="http://www.dreamstime.com/nature-walk-thumb8436665.jpg" /></li>
            <li><img src="http://www.dreamstime.com/save-the-nature-thumb15696583.jpg" /></li>
        </ul>
    </div>
</div>

Am I misunderstanding the function of the notify trigger? And if so, is there any alternate ways of accomplishing what I’m after?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T03:46:34+00:00Added an answer on May 27, 2026 at 3:46 am

    From the plugin example page, here’s how onBefore is being used:

    onBefore:function( e, elem, $pane, $items, pos ){
        /**
        * 'this' is the triggered element 
        * e is the event object
        * elem is the element we'll be scrolling to
        * $pane is the element being scrolled
        * $items is the items collection at this moment
        * pos is the position of elem in the collection
        * if it returns false, the event will be ignored
        */
        //those arguments with a $ are jqueryfied, elem isn't.
    }
    

    in that function, you can add your active class, and use the onAfter function to remove the class from the previous element.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm new to using the Perl treebuilder module for HTML parsing and can't figure
I would like to count the length of a string with PHP. The string
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
That's pretty much it. I'm using Nokogiri to scrape a web page what has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a jquery bug and I've been looking for hours now, I can't
I've got a string that has curly quotes in it. I'd like to replace
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
We're building an app, our first using Rails 3, and we're having to build

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.