Chrome not displaying transition effects after the page has finished loading

I've encountered an issue with a hidden div that is supposed to show on page load with a transition. While it works fine in Firefox, Chrome seems to be struggling to display the div.

If you'd like to try it out yourself, here's the link for comparison in both Firefox and Chrome:

The root of the problem likely lies within the CSS code, presenting a bit of a challenge to diagnose and resolve.

Interestingly enough, the issue doesn't occur when testing locally in Chrome, which adds to the confusion.

UPDATE: Solution Found

After some troubleshooting, I discovered that updating the script in the following manner resolved the discrepancy:

Initially:

<script>  
$(document).ready(function() {
  setTimeout(function() {
  $('.slider').css('visibility', 'visible');
  $('.slider').css('opacity', '1');
  $('.slider').css('max-height', '4000px');
  $('.slider').css('-webkit-transition', 'all 2s linear');
  $('.slider').css('transition', 'all 2s linear');//notice this line
    },3000);
});
</script>   

Updated Version:

<script>  
$(document).ready(function() {
  setTimeout(function() {
  $('.slider').css('visibility', 'visible');
  $('.slider').css('opacity', '1');
  $('.slider').css('max-height', '4000px');
  $('.slider').css('-webkit-transition', 'all 2s ease-in-out');
  $('.slider').css('transition', 'opacity 2s ease-in-out, max-height 2s ease-in-out');//This is the line I changed
    },3000);
});
</script>  

Although the reason behind the change is unclear, this adjustment successfully resolves the compatibility issues across all browsers.

Answer №1

If you want to update your Transition within your Class rather than using :hover, try these steps:

#clickme_about, #clickme_work, #clickme_interests, #clickme_find_me {

transition-duration: 0.4s;
transition-property: color;

}

Then, remove the transition from the hover effect.

It's possible that using the full property names instead of short forms could make a difference.

(Both methods worked for me in the latest version of Chrome)

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

What is the best way to send HTML content from a controller using ajax?

Here is the code in my controller: public async Task<ActionResult> GetHtml(int id) { var myModel = await db.Models.FindAsync(id); return Json(new { jsonData = myModel.MyHtml }, JsonRequestBehavior.AllowGet); } This is ...

How can I fetch a value from a database and set it as the selected option in a

I am facing an issue with the usage of the selectpicker plugin from Bootstrap in order to select multiple items. My requirement is to create a modal for editing where the data is fetched from previous records, particularly an array. I am looking for a way ...

Ways to showcase INPUT TYPE when making a Selection?

I've been struggling with a simple issue and despite trying multiple solutions, I can't seem to get it right. I have a form where I'm using the <select> tag with two options: coo and uh. What I want is for an additional input type fiel ...

Move the focus to the previous input field by removing the key

I have created a phone number input with 10 fields that automatically skip to the next field when you fill in each number. However, I would like to be able to go back to the previous field if I make a mistake and need to delete a digit. How can I achieve ...

Mobile browsers are displaying fonts unevenly within tables

Currently in the process of developing a desktop site () that should function optimally on mobile browsers without the need for a separate mobile version. While mobile Safari scales up fonts in large text blocks, tables used for content are causing some is ...

Steps to ensure that a particular tab is opened when the button is clicked from a different page

When I have 3 tabs on the register.html page, and try to click a button from index.html, I want the respective tab to be displayed. Register.html <ul class="nav nav-tabs nav-justified" id="myTab" role="tablist"> <l ...

How to Insert a Background Image into Advanced Custom Fields (ACF) using CSS

Hey there, I'm facing a bit of a challenge with this particular section. In the past, I've only included ACF PHP within HTML when the background image was directly in the HTML code. Now, however, I have two shapes specified in my CSS using pseudo ...

What is the proper way to add comments within CSS code inline?

Can anyone provide instructions on how to comment an inline css property, such as height, in the following code snippet? <div style="width:100%; height:30%;"> Any help is appreciated. Thank you! ...

Don't forget to keep track of when the user has closed

How can I ensure that the cache retains the user's action of closing the div? Currently, when I close the div and refresh the page, it reverts back to its original state. Is there a way to make this change persistent? Experience it live: Here is the ...

Concealing a Div element without the use of Jquery or JavaScript

I have an Upper and Lower div in my HTML code. I am trying to display the Lower div only if the Upper div is present, otherwise hide it. Is there a way to achieve this using CSS without using Jquery or Javascript? Note: No modifications should be made t ...

Using a PHP switch case statement with an HTML multiple select dropdown

I am facing an issue with my HTML multiple select box: <option value="1">First choice</option> <option value="2">Second choice</option> <option value="3">Third choice</option> Using jQuery, ...

Removing the gridlines in a Linechart using Apexcharts

I am experiencing issues with the grid and Nodata options on my Apexchart line chart. noData: { text: none , align: 'center', verticalAlign: 'middle', offsetX: 0, offsetY: 0, style: { color: undefined, fontSize: &apo ...

Is it possible to pause the jQuery.each() function until the ajax call inside the loop is finished?

I have a function that includes a jQuery.each loop iterating through all rows of a table. The issue arises because within the loop, there is an ajax call for each row, which means multiple ajax calls may be initiated simultaneously. I would like to modify ...

Creating Radial Fades with CSS3

Seeking guidance on creating a background similar to the one shown here using just CSS. I believe it can be done, but I struggle with CSS3. The goal is for the background to be compatible with all modern browsers, not overly concerned about support for br ...

Checkbox option to change background color of table cell

$('#selectall1').click(function(event) { if (this.checked) { $('.first').each(function() { this.checked = true; }); $('.second').each(function() { this.checked = false; }); $('.third&apos ...

After updating to Chrome version 65, I noticed an unexpected error popping up: The onClick listener was expected to be a function, but instead, it

I recently encountered an error in my React app that has been causing some issues. https://reactjs.org/docs/error-decoder.html?invariant=94&args[]=onClick&args[]=string Minified React error #94: Expected onClick listener to be a function, instea ...

Are CSS3 animations limited to working only with Webkit?

Trying to create a CSS3 animation featuring a puzzle piece on my website. Below is the code I'm using. Strangely, the animation only seems to be working on Safari and Chrome. Any tips on how to make it compatible with Firefox and Opera? Appreciate you ...

Determine the parent sibling of the image wrapper by using the specified selector

I am trying to write code that, when a button is clicked on, will find the parent elements' siblings (specifically an image within an "img_wp" div). However, my current code doesn't seem to be working. Can anyone spot where I might have gone wron ...

Why is JSON ParseError still returned by jQuery .ajax call despite JSON being seemingly correct?

Despite having valid JSON on jsonlint.com, I'm encountering a ParseError. Below is the jQuery code snippet: $.ajax({ url: path, type: 'GET', data: {}, cache: false, dataType: 'json', contentType: 'app ...

Best placement for <img> tag in HTML for creating a background image using CSS (excluding CSS3)

I am currently working on a programming project called Broadway through Codeacademy. I have been given the task of adding a background image to the webpage. It seems like an easy task to accomplish. The simplest way to achieve this effect is by using the f ...