Fade in the background of table row clips using jQuery's fadeIn() method

When using the fadeIn() function to change the dimensions of a table, Firefox is clipping the background of the newly shown rows.

If I click away from the tab and then return, the background is restored.

This issue does not occur in Chrome. I am using Firefox 26

View JSFiddle

JavaScript

$(function () {
    $(".small-link").on("click", function (event) {
        $(".showfields").fadeIn(250);
    });
});

CSS

.head {
    background-color: green;
    color:white;
}
.hidden {
    display:none;
}
.small-link {
    cursor:pointer;
}
table {
    border:1px solid red;
}

HTML

<table>
    <tr>
        <td><a class="small-link">Click this</a>
        </td>
    </tr>
    <tr class="hidden showfields">
        <td>........................................</td>
    </tr>
    <tr class="head hidden showfields">
        <th>Table Head</th>
    </tr>
</table>

Additional Information:

  1. Simply displaying the TR works, but I prefer to fade it if possible
  2. Fading the TH and TD elements fixes the issue for this simple case, but may not work for more complex code

Answer №1

Uncertain whether this issue is specific to Firefox, but a workaround is available by utilizing .fadeTo() in place of .fadeIn().

$(".showfields").fadeTo(250,.99);

Check out the jsFiddle demo

Answer №2

To add a background color, style the th element directly instead of applying it to the entire row (tr):

.head th {
    background-color: green;
    color: white;
}

SEE LIVE EXAMPLE

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

In the event that the "li" element contains an "

<ul> <li> <ul></ul> </li> <li></li> <li></li> <li></li> <li> <ul></ul> </li> </ul> Is there a way to specifically a ...

Having trouble displaying the cover image properly on mobile devices using Bootstrap/MDBootstrap, facing issues with the live server as well

My project includes a cover image in .jpg format that displays perfectly on desktop, but is invisible on mobile devices. When viewed through Live Server on Vscode, the image appears at all sizes including mobile, but when hosted on Netlify and accessed fro ...

Creating a torn paper illusion using CSS masking techniques

My goal is to create a ripped/lined paper effect using CSS mask. It's working well and looks good. However, I'm struggling to apply the mask at the top as well. Here's what I've tried so far: mask-image: linear-gradient(white, white), u ...

Error: Twilio exception - incorrect number of segments detected

I am utilizing Twilio for initiating a call from a browser to a phone. Upon clicking the call button, I encounter the following error message: Uncaught twilio.exception wrong number of segments <script type="text/javascript" src="https://ajax.googleapi ...

Change the input field font style in AngularJS

Check out this Plunker link for validation of input field: http://plnkr.co/edit/iFnjcq?p=preview The validation only allows numbers to be entered and automatically adds commas. My query is, if a negative number is entered in the field, how can I change th ...

What is the best way to create a list with images in a dropdown menu using HTML?

Thanks so much for your assistance! Below is the code snippet I am currently working on <li><a href="#Language">*LanguageHERE*</a></li> I am hoping to turn this into a dropdown menu that displays flags representing all available ...

Avoid having #content overlap by using a double sidebar layout

My current project involves utilizing Bootstrap to design a webpage featuring two fixed sidebars and a footer. Although I have successfully positioned the sidebars and footer, I am encountering issues with preventing the #content section from overlapping t ...

Combining Django Bootstrap input-group-addon with Model Form for seamless field integration

Currently, I am displaying my Django form in the following manner: <form action="/student/" method="post"> {% csrf_token %} {% bootstrap_form form %} <input type="submit" value="Launch" class="btn btn-primary"/> </form> I ha ...

Changing the color of a pseudo element in Material-UI

I'm having trouble changing the border color of the ::after pseudo element on a standard text field from MUI. I've been unable to figure it out. <TextField id="standard-basic" label="Email" variant="standard"/> ...

"Successfully made an Ajax request to the web handler, however, the response did not

Within my ASP.NET project, I have a Generic handler with the following code: public void ProcessRequest ( HttpContext ctx ) { try { ctx.Response.ContentType = "text/json"; var jsonData = new StreamReader(ctx.Request.InputStrea ...

The paragraph was unable to start in a new line as expected

After spending the past couple of hours scouring the internet and trying various solutions, I have come up empty-handed. My dilemma revolves around attempting to create a line break within a paragraph, but no matter what I try, it doesn't seem to work ...

Using Jquery to make an Ajax request to an Asp.net Web Method

My current approach involves using a jquery method to transmit only the member identification # from the client side to the server side. On the server side, I have a traditional Web Method in place to receive the data and execute SQL queries accordingly. ...

Transitioning to utilize the .on method for sorting livequery tables

Currently, I am in the process of upgrading my website to jQuery 1.7 and have plans to eventually move to the newest version as part of phase 2. I have a piece of livequery code that currently applies table sorting functionality to my existing tables, but ...

Increase the div size without altering its position in the HTML structure

Is it possible to expand a div element to the full width and height of the window or parent div without altering its position in the DOM using only CSS? <div id="parent1" class="fullwidth"> <div id="parent2" class="notfullwidth"> ...

Using a combination of CSS selector, several attributes, and the OR operator

Can you assist me with CSS selectors? Let's say we have a style HTML tag: <style type="text/css"> [...selector...] {color:red;} </style> I want to create a selector with multiple attributes and logical operators, but I am uncertain about ...

Accessing information from the database when logging in

I am currently working on a mobile application using Slim and Ajax. Within my database, there is a column that stores session codes for logins. After a user logs in, I need to compare the entered username with the database and retrieve the sessionCode asso ...

Is there a way to manage form submission while inside an ajax callback function?

Initially, I had the return true/false in my ajax callback function. However, I realized that it might not be in the correct context to be called. Therefore, I made some revisions to my function as shown below. Despite these changes, it still doesn't ...

Choose a specific element by referencing the attribute of another element

I am currently working with an XML document that is structured like this: <CollectionMappingData> <ContentTypes> <ContentType ContentTypeName="Content Type Name" SomeAttr="ValueINeed" /> </ContentTypes> <CollectionGrou ...

Calculate the total number of blank input boxes within a specific row of the table

What is the method to count the number of input boxes without a value in a table row using jquery? For instance: <table id="table1"> <tr class="data" id="row5"> <td><input type="text" value="20%" /></td> <td><input ...

The sliding content in the div below the one above it

Currently working on creating my portfolio website, and I have implemented a very dynamic parallax homepage with multiple layers. My goal is to enable one-page scrolling by using vh units. However, I encountered an issue where the div containing the abou ...