My html+js+form.html:     I have also a css, but its not important now. So my problem is, when i insert a new row, it wont be highlighted, just the others which is  i created the table in the beginning.  I tried:        $("#shipmentTable tr").click(function(){         $(this).addClass("selected").siblings().removeClass("selected");     });   and css for the table:           .member tr.selected {         background-color: rgba(41, 103, 182, 0.89);         color: #FFF;     }   but what i said i isnt working correctly. Can anyone helps to me?
112
I have a bit of code where I am looping through all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouse on/off.  This happens on page ready and works just fine.  The problem I have is that any select boxes I add via Ajax or DOM after the initial loop won't have the event bound.  I have found this plugin (), but before I add another 5k to my pages with a plugin, I want to see if anyone knows a way to do this, either with jQuery directly or by another option.
44881
Update  A month Several months later, a new top bar, and the bug still exists. An answer has already been posted that would fix the bug, so is this something that the dev team plans on fixing?  There are also a host of other problems caused by this, especially on the  and . Again, this would be fixed with  html{min-width:1000px;}   There is a slight bug with small windows on both the new meta and main site(s)?, shown here. The problem is that the top bar coloring doesn't stretch across when you resize and scroll left or right.        On Meta, when a horizontal scroll bar is needed, the black background will only be as wide as the width of the viewport, but when you scroll the coloring will not shift.  To reproduce:   Make screen as large as possible, or wait until the menu bar starts expanding Make it smaller and smaller until horizontal scrollbar appears, then scroll left and right.
62871
If my html looked like this:  &lt;td class="controlCell"&gt;     &lt;input class="inputText" id="SearchBag.CompanyName" name="SearchBag.CompanyName" type="text" value="" /&gt; &lt;/td&gt;   How could I select #SearchBag.CompanyName with JQuery? I can't get it to work and I fear it's the dot that's breaking it all. The annoying thing is that renaming all my id's would be a lot of work, not to mention the loss in readability.  Note: Please let's not start talking about how tables are not made for lay-outing. I'm very aware of the  and try hard to use it as much as possible.
39831
The \multirow text is covered by the background color. Does someone know why and can fix it?    \begin{table}[h]     \caption{caption}      \label{tab}      \centering     \begin{tabular}{cccccc}         \toprule         &amp; &amp; A &amp; B &amp; C &amp; D \\         \midrule         \rowcolor{gray!10}             \multirow{2}{*}{Rosso}  &amp; Pruning &amp; - &amp; - &amp; 6-C-Pr &amp; - \\         \rowcolor{gray!10}                                 &amp; Stalks &amp; - &amp; - &amp; 6-C-S &amp; - \\             \multirow{2}{*}{Verde}  &amp; Pruning &amp; - &amp; - &amp; 6-M-Pr &amp; - \\                                 &amp; Stalks &amp; - &amp; - &amp; 6-M-S &amp; - \\         \rowcolor{gray!10}             \multirow{2}{*}{Blu}    &amp; Pruning &amp; 4-Pa-Pr &amp; 5-Pa-Pr &amp; 6-Pa-Pr &amp; 7-Pa-Pr \\         \rowcolor{gray!10}                                 &amp; Stalks &amp; 4-Pa-S &amp; 5-Pa-S &amp; 6-Pa-S &amp; 7-Pa-S \\             \multirow{2}{*}{Bianco}         &amp; Pruning &amp; - &amp; - &amp; 6-W-Pr &amp; - \\                                 &amp; Stalks &amp; - &amp; - &amp; 6-W-Pr &amp; - \\             \bottomrule         \end{tabular} \end {table}
63031
In my answer to question    I suggest to (between others) to use makecell package to define head of table and later I sow that the firs row is not colored as expected. It doesn't cover all row. Than I try to correct this with use of cellcolor construct as should be correctly done, when you use multicolumn (simplified MWE from mentioned question):  \documentclass[12pt]{article}     \usepackage[utf8]{inputenc}      \usepackage[table]{xcolor}     \usepackage{longtable}     \usepackage{makecell} \renewcommand\theadfont{\bfseries}  \usepackage[active,tightpage]{preview} \PreviewEnvironment{longtable}%     \setlength\PreviewBorder{1em}      \begin{document} \begin{longtable}{|*{9}{b{\dimexpr 0.11\linewidth-2\tabcolsep}|}}     \hline     \multicolumn{8}{|c|}{\cellcolor{gray!30}{\thead{head\\ 1}}}     &amp; \cellcolor{gray!30}{\thead{head\\ 2}}   \\    \hline 1 &amp; 2 &amp; 3 &amp; 4 &amp; 5 &amp; 6 &amp; 7 &amp; 8 &amp; 9 \\     \hline\hline \endfirsthead     \hline 1 &amp; 2 &amp; 3 &amp; 4 &amp; 5 &amp; 6 &amp; 7 &amp; 8 &amp; 9 \\     \hline\hline \endhead A &amp; B &amp; C &amp; D &amp; E &amp; F &amp; G &amp; H &amp; I  \\ J &amp; K &amp; L &amp; M &amp; N &amp; O &amp; P &amp; Q &amp; R  \\ S &amp; T &amp; U &amp; V &amp; W &amp; X &amp; Y &amp; Z &amp;    \\     \hline\hline \end{longtable}     \end{document}   and discover that that head inmulticolumn doesn't has width of it and consequently head background color doesn't fill complete cell.     I Check makecell documentation, but doesn't find valuable information how to stretch actual head to cover entire cell. How to achieve that entire multicolum cell background will be colored?  addendum: for this particular case the stretch \thead over whole \multicolumn can be done on the following way: instead of  \multicolumn{8}{|c|}{\thead{\hfill head\hfill\\ 1}}   the multi column cell should be defined as  \multicolumn{8}{|p{\dimexpr 0.88\linewidth-\tabcolsep}|}{\thead{\hfill head\hfill\\ 1}}   where \dimexpr 0.88\linewidth-\tabcolsep is the width of multi col cell. then the result is:    however, general solutions are given in answers below.
16580
I am making an expand/collapse call rates table for the company I work for. I currently have a table with a button under it to expand it, the button says "Expand". It is functional except I need the button to change to "Collapse" when it is clicked and then of course back to "Expand" when it is clicked again. The writing on the button is a background image.  So basically all I need is to change the background image of a div when it is clicked, except sort of like a toggle.
89933
Hi, I want to create a table in my lightning component. I created 2 lightning:input fields and want to change the vertical alignment to "middle" but it does not work.   I tried to do the following:  &lt;td  class="slds-align-middle"&gt;&lt;lightning:input /&gt;&lt;/td&gt;   and this:   &lt;td&gt;&lt;span class="slds-align-middle"&gt;&lt;lightning:input /&gt;&lt;/span&gt;&lt;/td&gt;   and this:  &lt;td Style="text-align: center;vertical-align:top;" valign="middle"&gt;&lt;lightning:input /&gt;&lt;/td&gt;   I am using slds:      &lt;table class="slds-table slds-table_bordered slds-table_cell-buffer slds-table_col-bordered"&gt;      &lt;thead&gt;...&lt;/thead&gt;      &lt;tbody&gt;       &lt;tr&gt; [td in the middle of the cell] &lt;/tr&gt;      &lt;/tbody&gt;     &lt;/table&gt;   I hope someone can help me. Thanks!
105651
I worked briefly with Drupal 7 and I thought it was possible there but in Drupal 8 is it possible to have a view output an increasing numbered CSS classes for Views rows?  This is what I want.  &lt;div class="view"&gt;   &lt;div class="view-row-1"&gt;&lt;/div&gt;   &lt;div class="view-row-2"&gt;&lt;/div&gt;   &lt;div class="view-row-3"&gt;&lt;/div&gt;   &lt;div class="view-row-4"&gt;&lt;/div&gt; &lt;/div&gt;   I know I can add a CSS class to every row and give every row the same class.
13755
Title pretty much sums it up.  The external style sheet has the following code:  td.EvenRow a {   display: none !important; }   I have tried using:  element.style.display = "inline";   and  element.style.display = "inline !important";   but neither works. Is it possible to override an !important style using javascript.  This is for a greasemonkey extension, if that makes a difference.
76940
Possible Duplicate:          I tried to color only a cell of my table but I don't know how do it. I found the method to color an entire row.How could I color only a cell of my table of a precise color?
27914
Is it possible to highlight text inside of a textarea using javascript? Either changing the background of just a portion of the text area or making a portion of the text selected?
82056
I'm brand new to jQuery and have some experience using Prototype. In Prototype, there is a method to "flash" an element &mdash; ie. briefly highlight it in another color and have it fade back to normal so that the user's eye is drawn to it. Is there such a method in jQuery? I see fadeIn, fadeOut, and animate, but I don't see anything like "flash". Perhaps one of these three can be used with appropriate inputs?
119097
I am seeing a weird indentation for questions loaded via AJAX (i.e., by clicking the n question(s) with new activity link). The following screenshot was taken before I clicked the link:  And this is after the new question was loaded:  A browser refresh resolves the problem (as can be expected). It was tested with Chrome 88 and Firefox 85 on  (Catalina).
28047
Is there any syntactical way in jQuery to define multiple CSS attributes without stringing everything out to the right like this:  $("#message").css("width", "550px").css("height", "300px").css("font-size", "8pt");   If you have, say, 20 of these your code will become hard to read, any solutions?  From jQuery API, for example, jQuery understands and returns the correct value for both   .css({ "background-color": "#ffe", "border-left": "5px solid #ccc" })    and   .css({backgroundColor: "#ffe", borderLeft: "5px solid #ccc" }).   Notice that with the DOM notation, quotation marks around the property names are optional, but with CSS notation they're required due to the hyphen in the name.
36025
I am trying to color a multirow in my table, but without success until now: \documentclass{scrartcl} \usepackage[utf8]{inputenc} \usepackage{multirow} \usepackage{hhline} \usepackage{colortbl} \usepackage{multicol} \begin{document} \begin{table} \begin{tabular}{|l|c|c|c|c|} \hline \multicolumn{5}{|c|}{Type} \\ \hline   &amp; A  &amp;    B &amp; C &amp; D \\     \hline     X &amp; 53,2\%  &amp;   51,6\%  &amp;  \multirow{2}{*}{\cellcolor[gray]{.9}49\%} &amp; \multirow{2}{*}{\cellcolor[gray]{0.9}49\% }\\     Y  &amp; 53,8\%  &amp;  52,2\%  &amp;  &amp; \\ \hline \end{tabular} \end{table} \end{document}   What should I do, so that the two last multirow-cells get completely grey-colored?
21162
I am trying to style all the HTML elements by making a custom style sheet. Till now, i have succeeded in making only the radio-buttons and check-boxes.  is the link for the demo. I wanted to know what are the formal guidelines for UI designing while styling these controls so that they appear more clickable. And what more could be done to make the example more pleasant looking.
56974
I want to create a toggle button in html using css. I want it so that when you click on it  , it stays pushed in and than when you click it on it again it pops out.   If theres no way of doing it just using css. Is there a way to do it using jQuery?