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 8537473
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T10:54:35+00:00 2026-06-11T10:54:35+00:00

I am using the Jquery serialScroll plugin and have made a horizontal gallery which

  • 0

I am using the Jquery serialScroll plugin and have made a horizontal gallery which adds a .active class to the the current image. What I would also like to do is get the title of the current image and display it on the page within paragraph tags.

My HTML:

<p class="title"></p>

<div id="slideshow">

<ul>
<li><img src="www.website.com/1.jpg title="title 1" /></li>
<li><img src="www.website.com/2.jpg title="title 2" /></li>
<li><img src="www.website.com/3.jpg title="title 3" /></li>
<li><img src="www.website.com/4.jpg title="title 4" /></li>
</ul>

</div>

My Javacript:

// Easing equation, borrowed from jQuery easing plugin
// http://gsgd.co.uk/sandbox/jquery/easing/


 jQuery.easing.easeOutQuart = function (x, t, b, c, d) {
    return -c * ((t = t / d - 1) * t * t * t - 1) + b;
};

jQuery(function ($) {

    var $nav = $('#slideshow li');


    $('#slideshow').serialScroll({
        items: 'li',
        prev: '.prev',
        next: '.next',
        offset: 0, //when scrolling to photo, stop 230 before reaching it (from the left)
        start: 0, //as we are centering it, start at the 2nd
        duration: 1000,
        force: false,
        stop: true,
        constant: false,
        lock: false,
        cycle: false, //don't pull back once you reach the end
        easing: 'easeOutQuart', //use this easing equation for a funny effect
        jump: true, //click on the images to scroll to them
        navigation: $nav,
        onBefore: function (e, el, $p, $i, pos) {
            $nav.removeClass('newclass');
            $nav.eq(pos).addClass('newclass')
        },

    });
});

I figure I need to somehow add this Javascript to get the title:

<script>
var title = $("li.newclass img").attr("title");
$("p.title").text(title);
</script>
  • 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-06-11T10:54:36+00:00Added an answer on June 11, 2026 at 10:54 am

    First correct your html and add the ending quotes and correct the href part like so:

    <p class="title"></p>
    
    <div id="slideshow">
    
    <ul>
    <li><img src="http://www.website.com/1.jpg" title="title 1" /></li>
    <li><img src="http://www.website.com/2.jpg" title="title 2" /></li>
    <li><img src="http://www.website.com/3.jpg" title="title 3" /></li>
    <li><img src="http://www.website.com/4.jpg" title="title 4" /></li>
    </ul>
    
    </div>
    

    To make the text in the P the same as the title of the picture, use the same function as where you change the class… Like so:

    // Easing equation, borrowed from jQuery easing plugin
    // http://gsgd.co.uk/sandbox/jquery/easing/
    jQuery.easing.easeOutQuart = function (x, t, b, c, d) {
        return -c * ((t=t/d-1)*t*t*t - 1) + b;
    };
    
    jQuery(function( $ ){
    
        var $nav = $('#slideshow li');
        var pos = 0;
        $nav.removeClass('newclass');
        $nav.eq(pos).addClass('newclass')
        var title = $("li.newclass img").attr("title");
        $("p.title").text(title);
    
        $('#slideshow').serialScroll({
            items:'li',
            prev:'.prev',
            next:'.next',
            offset:0, //when scrolling to photo, stop 230 before reaching it (from the left)
            start:0, //as we are centering it, start at the 2nd
            duration:1000,
            force:false,
            stop:true,
            constant:false,
            lock:false,
            cycle:false, //don't pull back once you reach the end
            easing:'easeOutQuart', //use this easing equation for a funny effect
            jump: true, //click on the images to scroll to them
            navigation:$nav,
            onBefore:function(e,el,$p,$i,pos){
                $nav.removeClass('newclass');
                $nav.eq(pos).addClass('newclass')
                var title = $("li.newclass img").attr("title");
                $("p.title").text(title);
            }
        });
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using jQuery UI I have two radio buttons, Approve/Reject, which I would like to
Using jQuery validation plugin but it has no CSV validation. I have made an
Using jQuery, how would you find elements which have a particular style (eg: float:
Using jQuery, what's the best way to automatically initialize a plugin on all current
I am looking to implement horizontal scrolling using jQuery.SerialScroll (based on jQuery.ScrollTo ). I
I'm using Ariel Flesler's serialScroll script and would like to add a class to
Using jQuery version 1.4.2 and Validation plugin version 1.8.1 I have a textbox that
Using jQuery UI , I have a tabs plugin and within tab 1 gets
Using jQuery the jquery plugin along with the easing plugin. I have a series
Using Jquery , I have an array result [<a href=><img src=image1></a>,<a href=><img src=image2></a>] if

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.