I'm trying to select calendar event titles that have a specific word and use this to change the background colour of the event.  Please see my code below. This changes all events to have the background colour of red even if event title doesn't contain the word 'Test'. I've even changed 'Test' to 'uhrguqhergoieqhrgeurgherogih' but it still changes everything.   Unfortunately I can't see anything similar on SO so hopefully one of you could help me out please! :)  Thanks in advance!  $(window).on('load', function() {     if($(".fc-event-title:contains('Test')"))     {       $('.fc-event').css('background-color', 'red');     } });
9151
How can I check the existence of an element in jQuery?  The current code that I have is this:  if ($(selector).length &gt; 0) {     // Do something }   Is there a more elegant way to approach this? Perhaps a plugin or a function?
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.
30207
I want to change the fill color of cell C5 if it has the same value as cell A5.   Can this be done? I know how to format cell C5 if it has a certain value - but not when it is to be compared to the value of another cell.
1138
Is there a way to make the following return true?  string title = "ASTRINGTOTEST"; title.Contains("string");   There doesn't seem to be an overload that allows me to set the case sensitivity.. Currently I UPPERCASE them both, but that's just silly (by which I am referring to the  issues that come with up- and down casing).  UPDATE This question is ancient and since then I have realized I asked for a simple answer for a really vast and difficult topic if you care to investigate it fully. For most cases, in mono-lingual, English code bases  answer will suffice. I'm suspecting because most people coming here fall in this category this is the most popular answer.  answer however brings up the inherent problem that we can't compare text case insensitive until we know both texts are the same culture and we know  what that culture is. This is maybe a less popular answer, but I think it is more correct and that's why I marked it as such.
107180
I found a great article on color coding a list item based on dates.  However, this only works for 2 days within submission.  I am trying to have a coding structure that will let me know when something is late.  This is the information I am using:   I have a column that subtracts the two dates, then I have another column that uses this script:   ="&lt;DIV style='font-weight:bold; font-size:24px; color:"&amp;CHOOSE((IF(SubmissionDateDifference&lt;=2,2,1)),"red","green","orange")&amp;";'&gt;•&lt;/DIV&gt;"   With this script, it is only given me the Red and Green colors depending on if the date is greater than 2 days or less than 2 days.  I would like to have it give me Red for 0 days and green for greater than 0.  When I tried to change the numbers to &lt;=0,0, the formula didn't work.  Also, the final piece in case you were wondering is setting up a web part with the list and below the list is a CEWP with this HTML Script:  &lt;script type="text/javascript"&gt; // // Text to HTML // Demo: sharepoint.infoyen.com by Avinash Kumar Dad // var cellTDs = document.getElementsByTagName("TD"); var i=0; var TDContent = " "; while (i &lt; cellTDs.length) { try { TDContent = cellTDs[i].innerText || cellTDs[i].textContent; if ((TDContent.indexOf("&lt;DIV") == 0) &amp;&amp; (TDContent.indexOf("&lt;/DIV&gt;") &gt;= 0)) { cellTDs[i].innerHTML = TDContent; } } catch(err){} i=i+1; } // // ExpGroupRenderData overwrites the default SharePoint function // This part is needed for collapsed groupings // function ExpGroupRenderData(htmlToRender, groupName, isLoaded) {    var tbody=document.getElementById("tbod"+groupName+"_");    var wrapDiv=document.createElement("DIV");    wrapDiv.innerHTML="&lt;TABLE&gt;&lt;TBODY id=\"tbod"+ groupName+"_\" isLoaded=\""+isLoaded+ "\"&gt;"+htmlToRender+"&lt;/TBODY&gt;&lt;/TABLE&gt;";    var tBODYTDs = wrapDiv.getElementsByTagName("TD"); var j=0; var cellTDContent = " ";    while (j &lt; tBODYTDs.length) {       try {          cellTDContent = tBODYTDs[j].innerText || tBODYTDs[j].textContent;          if ((cellTDContent.indexOf("&lt;DIV") == 0) &amp;&amp; (cellTDContent.indexOf("&lt;/DIV&gt;") &gt;= 0)) {            tBODYTDs[j].innerHTML = cellTDContent;          }      }      catch(err){}      j=j+1;   }   tbody.parentNode.replaceChild(wrapDiv.firstChild.firstChild,tbody); }     The link for this assistance came from    Any assistance will be greatly appreciated.
9288
How can I change the colors of lightning-button?  I tried doing this in my css:  .my-button {     background-color: #14a6bc;     color: #ffffff; }   and applying that class to my &lt;lightning-button&gt; and removing the variant but I still get the base colors? I am trying to use these examples:
90551
This is not about system autocomplete, it's about an autocomplete internal to Calendar (autocompletion of the name of the event when you create one) - and is there any way to turn it off.  I have many hundreds of events in ical as I've been using it for about the past five years.     Problem is whenever I create a new event, then start typing in the event name field, as I work out what I want to call the event (or reminder), a giant list of similar past events that I've entered pops up and is annoyingly distracting. I'm simply not interested in those past events anymore and I don't want to know about them. I use ical as a reminders system for tasks, i.e. as a todo list as well as calendar. I find that better than using a separate task app in addition.  I'd love to find a way to turn these suggestions off, without having to delete all past events from my calendar history (which it looks like I might have to resort to).  Haven't found a way to do this but would be very grateful if someone knows how.
114566
Guys, can someone give me a brief run through of how to change the background colour of a CEdit control at runtime? I want to be able to change the background to red if the field is zero length and the normal white otherwise.
4851
I am trying to format cells in Excel 2013. I want the cells to get colored as green, yellow, and red based on how close they are with the target date (January 13, 2015 in this case).  I am unable to use conditional formatting as Excel says that relative formatting is not permitted within conditional formatting.   Target:   06-01-2015  01-01-2015 02-01-2015 03-01-2015 04-01-2015 05-01-2015 06-01-2015 07-01-2015 08-01-2015 09-01-2015 10-01-2015   If the date in the cell is more than 2 days of the target date, I want the cell to change color to Green. I used =DATEDIF($N12,$N$9,"d")&gt;=3 and the format changed to green.  If the date in the cell is exactly 2 days near the target date, I want the cell to change color to yellow. I used =DATEDIF($N12,$N$9,"d")=2 and the format changed to yellow.  If the date in the cell is within 2 days of the target date, I want the cell to change color to red. I used =DATEDIF($N12,$N$9,"d")&lt;2 and the format changed to red only for 5th and 6th January. Apparently, it does not recognize negative values.  How can I get this to match the required colors?
52292
I used this: wrapper    { background-color:yellow; } but I want really everything in the background to get colored. how to? Code above just makes the wrapper background change.
38968
My website changed significantly this month.  Amongst the changes was the website's title.  Two weeks ago, I finally used Webmaster Tools and submitted the page.  So far, Yahoo and Bing have updated the title in the search results, but not Google.  I've resubmitted via Webmaster Tools the website, and the bots have crawled the page, and have added "content keywords".  But the title still doesn't match.  The "content keywords" lists many of the words in the new title (but contains keywords of the existing title also).  Must say that 4 of the top 5 key words in the "significance" list are the new title's.  Still, no change.  Any remedies for this problem?  Is adding the "alt" tag for the logo significant enough to trigger the change?  There isn't an appropriate place to put the company name between  tags on the front page.  Any suggestions?  Thanks.
88086
I accidentally clicked "decline" on an Outlook invitation and now I can't reverse it -- the event has completely disappeared from my calendar!  How can I get back the event invitation and change my "Decline" to "Accept" or "tentative"?
64572
I'd like to use a smaller title. I'm using the scrartcl documentclass from the . I can change it's color font but not it's size.  \setkomafont{title}{\normalfont\bfseries\small}   Everything works exept the size.
84374
I’ve had a good look and can’t seem to find out how to select all elements matching certain classes in one jQuery selector statement such as this:  $('.myClass', '.myOtherClass').removeClass('theclass');   Any ideas on how to achieve this? The only other option is to do  $('.myClass').removeClass('theclass'); $('.myOtherClass').removeClass('theclass');   But I’m doing this with quite a few classes, so it requires much code.
3366
I really need a localized dropdown calendar. An English calendar doesn't exactly communicate excellence on a Norwegian website ;-)  I have experimented with the , their website says it can be localized, however that doesn't seem to work.  I am using ASPNET.MVC, and I really want to stick to one javascript library. In this case jQuery.  The ajax toolkit calendar would be acceptable, if only it too would display Norwegian names.  Update: Awesome! I see I am missing the language files, a not so minor detail :-)
24664
I'm looking for a way to change the CSS rules for pseudo-class selectors (such as :link, :hover, etc.) from JavaScript.  So an analogue of the CSS code: a:hover { color: red } in JS.  I couldn't find the answer anywhere else; if anyone knows that this is something browsers do not support, that would be a helpful result as well.
107230
I need to do some custom theming on the search block in Drupal 7.  Specifically, I need to add a class to the submit button that makes it invisible and removes it from the content flow.  So:  &lt;div class="form-actions form-wrapper" id="edit-actions"&gt;   &lt;input type="submit" id="edit-submit" name="op" value="Search" class="form-submit"&gt; &lt;/div&gt;   Becomes...  &lt;div class="form-actions form-wrapper element-invisible" id="edit-actions"&gt;   &lt;input type="submit" id="edit-submit" name="op" value="Search" class="form-submit"&gt; &lt;/div&gt;   I added element-invisible to the edit-actions div element.  However, I can't figure out how to do this.  What's the best practice for doing this sort of thing?