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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T13:50:17+00:00 2026-05-28T13:50:17+00:00

jsFiddle: http://jsfiddle.net/Mw4j2/6/ Trying to change attributes to a selector if the seconds count is

  • 0

jsFiddle: http://jsfiddle.net/Mw4j2/6/

Trying to change attributes to a selector if the seconds count is 10 or under.

I’m using

var returnSecondsNumber = $('.countdownSecond > .countSeconds > .position:first-child > .digit').text() + $('.countdownSecond > .countSeconds > .position:nth-child(2) > .digit').text();

To grab the numbers from both spans and returns it as 16/15/14/etc.

Now I need do something if this numeric is under 10.

e.g.

    if (returnsSecondsNumber <= 10) 
       { $(this).addClass('urgent'); 
       }, else { //do something 
       }

I’ve tried taking a look at parseInt with no success. Any help would be much appreciated!

Thanks.

  • 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-28T13:50:18+00:00Added an answer on May 28, 2026 at 1:50 pm

    Two things:

    1. First, you need to move the code that constructs “returnSecondsNumber” into the callback function(s) of whichever timers you want to monitor.
    2. Second, just use parseInt():

      var numericVal = parseInt(returnsSecondsNumber, 10);
      if (!isNaN(numericVal) && numericVal < 10) {
        // do whatever
      }
      
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

JSFiddle: http://jsfiddle.net/QbyUR/ So, I have an empty TD, that I'm trying to remove the
I have created this jsfiddle: http://jsfiddle.net/mfnxm/1/ I am trying to create this JSON: [{
I have the following jsFiddle - http://jsfiddle.net/uShjA/ - and I am trying to do
jsFiddle: http://jsfiddle.net/4z2Vx/ I'm trying to create a multi-column dropdown/menu widget. The image on the
Jsfiddle: http://jsfiddle.net/yJJs7/ Javascript: function main(){ var centerx=250; var centery=250; var degrees=0; var div=document.getElementById('test'); var
In this JSFiddle http://jsfiddle.net/littlesandra88/mzPxN/ am I trying to use the tablesorter plugin to sort
Check out this jsfiddle http://jsfiddle.net/Y7fEW/ . I'm trying to get the tan div on
var x = window.Something; alert(window.x) when i try this code in jsfiddle http://jsfiddle.net/XJEGU/ ,
Having some issues trying to create a fixed header layout for this jsfiddle: http://jsfiddle.net/4xk4D/107/
JSFiddle: http://jsfiddle.net/KH8Gf/27/ Code: $(document).ready(function() { $('#expand').click(function() { var qty= $('#qty').val(); for (var counter =

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.