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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T16:16:26+00:00 2026-05-31T16:16:26+00:00

I am building a chrome extension and I need to be able to execute

  • 0

I am building a chrome extension and I need to be able to execute a click() on the first table with class show_review. The issue I have is that these links all have the same class with no ID.

Here is what I am trying to click there are multiple tables all with the same class:

<table cellpadding="0" cellspacing="0" class="show_review" onmousemove="csmd1(this)" onmousedown="csmd2(this)" onclick="adOpen(this,1,317543,'680536')" msm="1" msc="1"></table>

Here is my code. It doesn’t do anything when I reload. Just sits there no click has been made.

if ($(".show_review")[0].length){
    $(".show_review")[0].click();
}
  • 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-31T16:16:27+00:00Added an answer on May 31, 2026 at 4:16 pm
    if ($(".show_review").length){
        $(".show_review").eq(0).click();
    }
    

    Though you can do it with one line:

    $(".show_review:first").click();
    

    jQuery selectors and functions was designed to work with 0+ elements.
    So in this case if no element was selected, the click function will just do nothing.

    Thanks you jQuery!


    Update:
    You might need to use the DOM ready event.

    $(function(){
        ...
        $(".show_review:first").click();        
        ...
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am building my first chrome extension, for that I want to have some
I'm building an application that has its own custom chrome. I have turned the
I'm building a chrome extension and I need to read the HTML code of
I'm building this Google Chrome extension and I find it a nuisance to have
So im building a chrome extension and I have placed an audio flash player
I am building an extension for Chrome browser. I wish to be able to
I am building chrome extension i need to detect the current loading tab id's
I'm currently building a chrome extension that pulls data from a Drupal 6 website,
I'm building a small Chrome extension that must send messages through a POST http
I have the latest Chrome, I'm building an extension. Consider the following code: var

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.