CSS error in Jquery Fullcalendar when using Google Chrome

Asked

Viewed 160 times

1

I’m working with the Jquery library FullCalendar and I have a function that paints certain calendar lines according to one condition.

The function works perfectly in Internet Explorer, but in Goolge Chrome the lines are not painted.

I’ve tried to change .css('background-color', '#FFFFFF;') for .style.backgroundColor="#FFFFFF;", but nothing happens.

What is the best way to change the background color of an element to be correctly displayed in Google Chrome? Below follows the code. The symbols '>', '<', '&&', etc. have been replaced by the corresponding HTML entities as this function is in a file .XHTML of the JSF.

if(timeSlot &gt;= str &amp;&amp; timeSlot &lt; obj.horaTermino)      
//Change 13 and 18 according to what you need
{


  $(this).closest('tr').css('background-color', '#FFFFFF;');
    //$(this).closest('tr').style.backgroundColor="#FFFFFF;";


}

2 answers

1

0

 $(this).closest('tr').css('background-color', '#FFFFFF!important;');

See if in the Chrome Inspect Element it is adding the white background to the object.

The !Important prioritizes the property in which it is being assigned if it has the same property in the same element.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.