Percent highlighting of rows of a small report that works great in Chrome but not in IE

Hi all.. I have percent highlighting of rows of a small report that works great in Chrome but not in IE.

Chrome works with the below and show percentage when text was 86% it shows color for 86% of the table cell.
linear-gradient(to right, yellow "+$( this ).text()+", white 1%

IE doesn't show an error but shows no color

$(document).ready(function() {
  $('table[summary="Progress"] td[headers="PERCENT_COMPLETE"]').each(function( index ) {
    if( $( this ).text() != '0%' && $( this ).text() !='100%' ){
      // Yellow     console.log( index + ": " + $( this ).text() );
      $( this ).parent().find("td:first").css("background","linear-gradient(to right, yellow "+$( this ).text()+", white 1%");
    } else if( $( this ).text() =='100%' ){
      // Green for 100%
      $( this ).parent().children().css('background','green')
    } 
  });
});

What would I use that would work in IE, Chrome, Firefox?

Open in new window


Thank you,
Bill
LVL 2
BILL CarlisleAPEX DeveloperAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Dave BaldwinFixer of ProblemsCommented:
What version of IE and what version of jQuery?  http://jquery.com/download/
0
BILL CarlisleAPEX DeveloperAuthor Commented:
IE 11.0.9600
jquery-ui/1.8/ui/minified/jquery.ui.tabs.min.js
jquery.autotab.min.js

jquery-ui/1.8.22/themes/base/jquery-ui.min.css
jquery-ui/1.8/themes/base/jquery.ui.tabs.css
0
BILL CarlisleAPEX DeveloperAuthor Commented:
Ok, I pinpointed one td and used the gradient and it works, so I would say it is NOT the gradient code that is my problem

this works:
$('table[summary="Progress"]  input[value="60"]').parent().css('background','linear-gradient(to right, yellow 46%, white 1%)')

So I would say it is my selector
$( this ).parent().find("td:first")

does IE have a problem with find td:first ?
0
BILL CarlisleAPEX DeveloperAuthor Commented:
Solved:  It likes ATTR() instead of CSS()

Does work:
$('table[summary="Progress"]  input[value="60"]').parent().attr('style','background:linear-gradient(to right, yellow 74%, white 1%)')

Does NOT work:
$('table[summary="Progress"]  input[value="60"]').parent().css('style','background:linear-gradient(to right, yellow 46%, white 1%)')
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
BILL CarlisleAPEX DeveloperAuthor Commented:
Great answer! :)
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
jQuery

From novice to tech pro — start learning today.