JavaScript How to change background color of td elements based on th using jquery change background color in photoshop,change background color google docs,

I'm stuck with a challenge to change the background color of td elements based on the th class. Below is the html code, which has th class called bots, I've to change the background color of all the td elements below the bots class.

<table border="1" class="CSSTableGenerator" id="myTable">
  <tr>
    <th>Component</th>
    <th>Properties</th>
    <th class="bots">J10</th>
    <th>J11</th>
    <th>J12</th>
    <th>J13</th>
  </tr>
  <tr>
    <td>GenerateAlternateTagUrlDroplet</td>
    <td>alternateTagConfiguration</td>
    <td class="trueValue">/com//jec/website/seo/</td>
    <td class="trueValue">/com//jec/website/seo/</td>
    <td class="trueValue">/com//jec/website/seo/</td>
    <td class="trueValue">/com//jec/website/seo/</td>
  </tr>
  <tr>

    <td>AlternateTagUrlDroplet</td>
    <td>tagConfiguration</td>
    <td class="trueValue">/jec/website/seo/</td>
    <td class="trueValue">/jec/website/seo/</td>
    <td class="trueValue">/jec/website/seo/</td>
    <td class="trueValue">/jec/website/seo/</td>
  </tr>
</table>
Answer:1

You can use map() to return array of indexes with .bots class and then change css of td with same index.

var bots = $('tr th.bots').map(function() {
  return $(this).index();
}).get()

$('tr:not(:first) td').each(function() {
  if (bots.indexOf($(this).index()) != -1) $(this).css('background', 'blue')
})
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<table border="1" class="CSSTableGenerator" id="myTable">
  <tr>
    <th>Component</th>
    <th>Properties</th>
    <th class="bots">J10</th>
    <th>J11</th>
    <th class="bots">J12</th>
    <th>J13</th>
  </tr>
  <tr>
    <td>GenerateAlternateTagUrlDroplet</td>
    <td>alternateTagConfiguration</td>
    <td class="trueValue">/com//jec/website/seo/</td>
    <td class="trueValue">/com//jec/website/seo/</td>
    <td class="trueValue">/com//jec/website/seo/</td>
    <td class="trueValue">/com//jec/website/seo/</td>
  </tr>
  <tr>

    <td>AlternateTagUrlDroplet</td>
    <td>tagConfiguration</td>
    <td class="trueValue">/jec/website/seo/</td>
    <td class="trueValue">/jec/website/seo/</td>
    <td class="trueValue">/jec/website/seo/</td>
    <td class="trueValue">/jec/website/seo/</td>
  </tr>
</table>
Answer:2

There is a link like <a href="http://www.google.com">Google</a> inside a web page of UIWebView in my app.How can I force this link opened with Safari when it's clicked?I've tried target="...

There is a link like <a href="http://www.google.com">Google</a> inside a web page of UIWebView in my app.How can I force this link opened with Safari when it's clicked?I've tried target="...

  1. force open link in new tab
  2. force open link in internet explorer
  3. force open link in safari
  4. force open link in chrome from ie
  5. force open link in new window
  6. force open link in firefox
  7. force open link in new tab chrome
  8. force open link in new tab firefox
  9. force link open specific browser
  10. android force open link in browser
  11. chrome force open link in same tab
  12. html force open link in new tab
  13. android force open link in app
  14. firefox force open link in same tab
  15. javascript force open link in new window
  16. html force open link in new window
  17. android webview force open link in browser
  18. force chrome to open link in new window
  19. force browser to open link in new tab
  20. force edge to open link in new tab

I've just created my Gruntfile.js which shows me the following Error when running grunt -v: Reading "Gruntfile.js" Gruntfile...OK Registering Gruntfile tasks. Loading "Gruntfile.js" tasks...ERROR &...

I've just created my Gruntfile.js which shows me the following Error when running grunt -v: Reading "Gruntfile.js" Gruntfile...OK Registering Gruntfile tasks. Loading "Gruntfile.js" tasks...ERROR &...

  1. grunt debug gruntfile
  2. how to debug gruntfile.js

I'm a bit perplexed on what should be a simple fix. I'm running a react-native project on version 0.27.2, and all of my ios.js files successfully import Stylesheet except one. The import looks like ...

I'm a bit perplexed on what should be a simple fix. I'm running a react-native project on version 0.27.2, and all of my ios.js files successfully import Stylesheet except one. The import looks like ...

  1. react native canvas
  2. react native can't find variable
  3. react native cannot call a class as a function
  4. react native cannot read property of undefined
  5. react native canvas draw image
  6. react native cannot find module
  7. react native can't find variable document
  8. react native can't find variable component
  9. react native can't find variable navigation
  10. react native cancel animation
  11. react native cannot find simulator
  12. react native canvas game
  13. react native can't find variable buffer
  14. react native cannot find module template.config
  15. react native canopenurl
  16. react native can't find variable image
  17. react native cancel fetch
  18. react native can't find variable button
  19. react native can't find variable require
  20. react native can't find variable stylesheet

I have an application built in Meteor. I run it locally and it is also deployed on a server. I just found out that the application is not running anymore on Chrome. I am not sure but probably the only ...

I have an application built in Meteor. I run it locally and it is also deployed on a server. I just found out that the application is not running anymore on Chrome. I am not sure but probably the only ...