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

  • Home
  • SEARCH
  • 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 6085655
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T11:39:47+00:00 2026-05-23T11:39:47+00:00

On page load, the javascript makes the first thumbnail active, but i would like

  • 0

On page load, the javascript makes the first thumbnail active, but i would like to change it to the second, third or even fourth thumbnail depending on the page that it is loading.

The javascript works for first thumbnail as active:

$('#menu ul li.menuItem:first').addClass('act').siblings().addClass('inact');
/* On page load, mark the first thumbnail as active */

i’ve tried changing it to:

$('#menu ul li.menuItem:second').addClass('act').siblings().addClass('inact');

but didnt work..what is the proper code for changing it to second, third, fourth etc..

  • 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-23T11:39:48+00:00Added an answer on May 23, 2026 at 11:39 am

    Use the :eq() selector…

    $('#menu ul li.menuItem:eq(2)')
    

    Keep in mind that :eq() is 0 based.

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

Sidebar

Related Questions

On page load, the javascript would make the menu button active. $('#menu ul li.menuItem:eq(1)').addClass('act').siblings().addClass('inact');
I wish to load some additional data from javascript in an HTML page. The
I am using an JavaScript (and AJAX) to dynamically load a PHP page into
Upon page load I want to move the cursor to a particular field. No
Is Page.Load the earliest point in the Page.Load life cycle to add Response.AppendHeader?
During an ASP.NET page load I'm opening and closing multiple System.Data.SqlClient.SqlConnections inside multiple controls
I have the following Javascript between tags in a template: YAHOO.util.Event.addListener(window, load, function() {
I am building a javascript widget that should load asynchronously. Problem is that there
I'm having some trouble figuring out how to make the page load architecture of
Is it possible to make. jquery ajax success, then continue load page's html? For

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.