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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T03:36:44+00:00 2026-06-13T03:36:44+00:00

i have some list, sometimes this lis have 5, sometimes have 7 elements. I

  • 0

i have some list, sometimes this lis have 5, sometimes have 7 elements. I want to check how many, and add for less than 5 some style. Si i have this, but it’s not working… Maybe i need to add some live checking? Also i’v set time interval for some kind of late chacking. Thx, for help.

setTimeout(function(){
    var single_producer_products_list = $('.single_producer_products_list').find('li');
    if ((single_producer_products_list < 7)) {
        $('.producer_series_info').addClass('longer');
    }
},200)
  • 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-13T03:36:45+00:00Added an answer on June 13, 2026 at 3:36 am

    You can use length property:

    The number of elements in the jQuery object.

    $('.single_producer_products_list').find('li').length
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some LINQ code that generates a list of strings, like this: var
I have some financial data gathered at a List[(Int, Double)], like this: val snp
Say I have this basic setup: #include <list> struct Linker { Linker* to; //some
I have an Entity. And sometimes I need this object also contains some value,
I have some std::list<char> list_type Now I have to supply contents of the list
If I have some R list mylist , you can append an item obj
I have dynamically created some list of RadioButtons with some values. pro grammatically I
I have some filters expressed as a list of function List(MyClass => Boolean) .
I have some code that inserts a list item into a list... I then
We have some code which sorts a list of addresses based on the distance

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.