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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T20:22:59+00:00 2026-06-04T20:22:59+00:00

I am using this vTicker script . It uses an li to scroll the

  • 0

I am using this vTicker script. It uses an li to scroll the items and there are also Previous and Next buttons. I want to mod the jQuery to say if there is only one li do not scroll and hide the buttons.

<div id="scroller">
    <ul id="list">
        <li>Test 1</li>
        <li>Test 2</li>
        <li>Test 3</li>
        <li>Test 4</li>
        <li>Test 5</li>
    </ul>
</div>
<a class="Prev" href="#">Prev</a>
<a class="Next" href="#">Next</a>

Jquery:

$(function(){
    var $scroller = $("#jqscroller");
    $scroller.vTicker('init', {height: 20, showItems: 1});

    $(".next").click(function(){ 
        $scroller.vTicker('next');
    });

    $(".prev, .next").hover(function(){ 
        $scroller.vTicker('pause', true);
    }, function(){
        $scroller.vTicker('pause', false);
    });

    $(".prev").click(function(){ 
        $scroller.vTicker('prev');
    });
});

So is there a way to only call the function if li is greater than 1 and add a css class to the buttons so I can display:none them?

  • 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-04T20:23:01+00:00Added an answer on June 4, 2026 at 8:23 pm

    You can do like this:

    if ($('#list li').length === 1) {
       $('.Prev, .Next').hide();
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using this jQuery validation plugin. http://www.benjaminkeen.com/software/rsv/jquery/index.php I want to validate a checkbox group with
Using this jquery code: <a href=javascript:void(0) id=m1>Get Selected id's</a> jQuery(#m1).click( function() { var s;
I'm using a jquery plugin on my page, vTicker , for easy and simple
Using this batch file I want zip some *.txt files. Each *.txt file in
using this as a guide: http://msdn.microsoft.com/en-us/library/dd250846.aspx can someone help me with the jquery call?
We are using the jQuery vTicker plug-in for a scrolling news feed on the
Using this example . Pretend there are date fields in both forms. How would
Using this Jquery plug-in http://www.trirand.com/blog/jqgrid/jqgrid.html How do you: edit the cell content (looking at
Using this script to send id to file.php which queries database and returns output
Using this php script, I can call a webservice. The file names will be

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.