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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T23:29:44+00:00 2026-05-27T23:29:44+00:00

I am working on a page that use the Ajax Control Toolkit’s TabContainer .

  • 0

I am working on a page that use the Ajax Control Toolkit’s TabContainer. In each TabPanel there is a GridView.

<act:TabContainer runat="server">
    <act:TabPanel runat="server">
        <asp:GridView runat="server" ...>
        </asp:GridView>
    </act:TabPanel>
      ...
    <act:TabPanel runat="server">
        <asp:GridView runat="server" ...>
        </asp:GridView>
    </act:TabPanel>
</act:TabContainer>

Then on the front-end, a JQuery tablesorter is bound to the tables. After the tablesorter is bound, the rows are styled in an alternating fashion, this is done with the following bit of code:

var rows = $('tr.Clickable');

for (var i = 1; i < rows.length; i += 2) {
    var oddrow = 'tr.Clickable:eq(' + i.toString() + ');';
    $(oddrow).addClass('odd');
}

On some machines, the browser returns a warning that a script is taking too long to finish, and this happened right after the previous javascript was added. I think that the use of the selector: tr.Clickable:eq(n) is the culprit.

I would like to just loop over the rows array and do an .addClass('odd') for rows with and index that is odd, however, the elements of the rows array don’t have an .addClass method, so I used the :eq selector to compensate.

This works, but very slowly, is there a faster way to do this?

  • 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-27T23:29:45+00:00Added an answer on May 27, 2026 at 11:29 pm

    use the :odd selector

    $('tr.Clickable:odd').addClass('odd');
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a TabContainer with three pages of input fields. For each TabPanel there's
I'm working on developing a page that pulls data down only via ajax: http://itprojectguide.org/projectmatrix/itprojectguideprojectmatrix.html
I'm working with Mootools to develop a simple ajax-y page that does some manipulation
I'm using the AutoCompleteExtender from the AJAX control toolkit on my aspx page -
I am working on .aspx page that uses a t-sql query that uses a
I'm working on a page that, when I load into IE8 and view the
I'm currently working on a page that loads several images sequentially using setTimeout and
I am currently working on a page that has a date picker for one
Had a page that was working fine. Only change I made was to add
Currently I am working on a web page that has six ReportViewer controls that

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.