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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T09:54:16+00:00 2026-06-12T09:54:16+00:00

here’s the thing, the bills came out from a dot matrix printer, and the

  • 0

here’s the thing, the bills came out from a dot matrix printer, and the paper is in continous format (like mos of you guys may saw in a sales department). Sometimes to cover a sale, the salesman take a bill (not printed a blank one) to make it by hand.
the system as it is now, can handle this jumps by letting people set the value by hand and then it continues incrementing the value.

but htere’s a gap left, I have to highlight the row (just the cell with the id) before the gap, just to make more visible the fact that someone took a bill, made it by hand and haven’t reguistered yet.

it’s like this:
(the css class for the id column is clave, meaning key)

|  id | qtty | price |
|-----+------+-------+
| 001 |   25 |     3 |
| 002 |   35 |     5 |
| 004 |   86 |     3 |
| 005 |   96 |     1 |
| 007 |   85 |     2 |
| 008 |   24 |     1 |

so the row for id 002 and 005 should be presented with font-weight: bold css, to make more spotable the missing bills.
the other problem I have is that this html structure is not a table, it is actually made of layers (div tags).

I have tghis much of the code, I don’t know why it isn’t working…
and youi can see it running here:
in this JSbin

  • 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-12T09:54:17+00:00Added an answer on June 12, 2026 at 9:54 am

    After a long time looking at your explanation I think this is what you want to do

    $(document).ready(function() {
        $(".clave").each(function(i, v) { // loop through each elem with class=clave
            var $next = $.trim($(".clave").eq(i + 1).text()); // get next text
            var $ele = $.trim($(v).text()); // get this text
            if ((+$next) - (+$ele) > 1) { // subtract next from now - if greateer than 1
                $(v).css('color', 'red').css('font-weight','bold'); // turn current text bold
            };
        });
    });​
    

    EDIT:
    Forgot to use $.trim() instead of .trim() for cross browser support

    http://jsfiddle.net/Zxc2w/

    http://jsbin.com/isaruj/5/

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

Sidebar

Related Questions

I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
Here's a coding problem for those that like this kind of thing. Let's see
Here is what I am currently doing. PHP echo's out the recent post in
Here is the script I'm using, copied directly from Google: <script type=text/javascript> var _gaq
Here's a piece of code I copied from http://www.schillmania.com/content/projects/javascript-animation-1/demo/ Very simple JS animation: function
Here's what my table TheTable looks like ColA | ColB | ColC ------+-------+------ abc
Here's a dump of the stats provided my mod_pagespeed from one of my sites.
Here is an object that I'd like to use with ng-repeat, but it's not
Here is the code from my project where I am using a datepicker. The
Here I am trying to retrieve the response from the server and display it,

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.