Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <pre><code>&lt;html&gt; &lt;head&gt; &lt;script type="text/javascript"&gt; disable = new Boolean(); function highlight(a) { if(disable==false)a.className='highlight' } function normal(a) { a.className='normal' } &lt;/script&gt; &lt;style type="text/css"&gt; table#tblTest { width: 100%; margin-top: 10px; font-family: verdana,arial,sans-serif; font-size:12px; color:#333333; border-width: 1px; border-color: #666666; border-collapse: collapse; } table#tblTest tr.highlight td { background-color: #8888ff; } table#tblTest tr.normal { background-color: #ffffff; } table#tblTest th { white-space: nowrap; border-width: 1px; padding: 8px; border-style: solid; border-color: #666666; background-color: #dedede; } table#tblTest td { border-width: 1px; padding: 8px; border-style: solid; border-color: #666666; background-color: #ffffff; } &lt;/style&gt; &lt;/head&gt; &lt;body&gt; &lt;table id="tblTest"&gt; &lt;thead&gt; &lt;tr&gt; &lt;th&gt;Name&lt;/th&gt; &lt;th&gt;Address&lt;/th&gt; &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt; &lt;tr onMouseOver="highlight(this)" onMouseOut="normal(this)" &gt; &lt;td&gt;Tom&lt;/td&gt; &lt;td&gt;UK &lt;/td&gt; &lt;/tr&gt; &lt;tr onMouseOver="highlight(this)" onMouseOut="normal(this)" &gt; &lt;td&gt;Hans&lt;/td&gt; &lt;td&gt;Germany&lt;/td&gt; &lt;/tr&gt; &lt;tr onMouseOver="highlight(this)" onMouseOut="normal(this)" &gt; &lt;td&gt;Henrik&lt;/td&gt; &lt;td&gt;Denmark&lt;/td&gt; &lt;/tr&gt; &lt;tr onMouseOver="highlight(this)" onMouseOut="normal(this)" &gt; &lt;td&gt;Lionel&lt;/td&gt; &lt;td&gt;Italy&lt;/td&gt; &lt;/tr&gt; &lt;tr onMouseOver="highlight(this)" onMouseOut="normal(this)" &gt; &lt;td&gt;Ricardo&lt;/td&gt; &lt;td&gt;Brazil&lt;/td&gt; &lt;/tr&gt; &lt;tr onMouseOver="highlight(this)" onMouseOut="normal(this)" &gt; &lt;td&gt;Cristiano&lt;/td&gt; &lt;td&gt;Portugal&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;input type="button" onclick="disable = true;" value="Disable" /&gt; &lt;input type="button" onclick="disable = false;" value="Enable" /&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>Fixed your code. Use a function to check if it's disabled, if it isn't, then highlight. If it is, then don't. Simple enough.</p> <p><a href="http://pastehtml.com/view/bbuvrg5p5.html" rel="nofollow">Demo</a></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload