Firefox smoothly shifts when a class is included

Take a look at

If you click on one of the large brown rectangles, a jQuery script adds a "dropped" class which changes the top position. Surprisingly, this transition effect does not work in the latest version of Firefox, unlike in other browsers. I am puzzled by this behavior. Interestingly, when I manually add the class using the in-browser debugger, it transitions smoothly! If anyone has any insights or suggestions regarding this issue, I would greatly appreciate it.

Below is my CSS (less) code:

.card {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    -webkit-transition: 0.6s  top 0;
    -moz-transition: 0.6s  top 0;
    -o-transition: 0.6s  top 0;
    -ms-transition: 0.6s  top 0;
    transition: 0.6s  top 0;
    img {
        width: 100%;
    }
    &.one {
        z-index: 4;
        background: @brown1;
        background-size:100% auto;
        top: 0%;
        &.dropped {
            top: 90%;   
        }
    }
    &.two {
        z-index: 3;
        background: @brown2;
        top: 0;
        &.dropped {
            top: 85%;   
        }
    }
    &.three {
        z-index: 2;
        background: @brown3;
        top: 0;
        &.dropped {
            top: 80%;   
        }
    }
}

Answer №1

Your JavaScript or jQuery application seems to be causing the issue.

After manually inserting

onclick="this.className += ' dropped'"
, the functionality works as expected. It's hard to pinpoint the exact problem in your script since it is minified.

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

Uploading images with AJAX using Rails, Backbone, and Remotipart

For some time, I've had success using Remotipart to upload images via AJAX. However, we have made the decision to switch to Backbone recently. Now that my forms are generated through JS templates, I am unable to utilize the :remote => true syntax t ...

Here's a solution for fixing this layout issue: The alignment of the table titles with the content needs to be adjusted, and the content in each row should

I am attempting to create a layout that features a type column on the left that takes up more width compared to the other two items on the right. This is because the type and description may be lengthy. Additionally, I want the type and description of each ...

How can you customize the output of JSON.stringify for objects in JavaScript?

What steps can be taken to customize the default output of JSON.stringify for an object? ...

Learn how Angular 2 allows you to easily add multiple classes using the [class.className] binding

One way to add a single class is by using this syntax: [class.loading-state]="loading" But what if you want to add multiple classes? For example, if loading is true, you want to add the classes "loading-state" and "my-class". Is there a way to achieve t ...

Utilize a function on specific attribute values

I have a function in JavaScript that is designed to convert all relative URLs into absolute URLs. function rel2Abs(_relPath, _base); //_relPath represents the relative path //_base indicates the base URL Now, my objective is to implement this function on ...

Can bootstrap and all of its dependencies be imported in just one file?

Is it possible to utilize <script src="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="93f1fcfce7e0e7e1f2e3d3a6bda3bda2">[email protected]</a>/dist/js/bootstrap.bundle.min.js&qu ...

PHP Attempting to retrieve variables from a form submission

After submitting my form and it being processed by the PHP, the variables from the HTML are not being received. This is the code in my index.php form: <form method="post" action="postConsole.php"> Target: <select name="target" size ="1"> & ...

Declaring an array that holds Angular components in Angular 11: What's the best approach?

I'm trying to implement a feature in my Angular component where I can create a list that displays content from other components. My current approach involves declaring an array that contains references to different Angular components: import { Compone ...

Building a custom login page with axios in a react-redux application

I've encountered an issue with my login page. When I click the submit button, it does not redirect to the main Dashboard page. Check out the code below for authentication/login.js: import React, { Component } from 'react' import { Field, ...

What approach do you recommend for creating unique CSS or SCSS styles for the same component?

Consider a scenario where you have a complicated component like a dropdown menu and you want to apply custom styles to it when using it in different contexts. This customization includes not only changing colors but also adjusting spacing and adding icons. ...

Turning an svg tag into a WebElement: a step-by-step guide

<img src="data:image/svg+xml;base64,PHN2ZyBzdG9rZS1kYXNoYXJyYXk9IiIgdmVjdG9yLWVmZmVjdD0iIiB3aWR0aD0iMjIiIGhlaWdodD0iMjIiIHZpc2liaWxpdHk9InZpc2libGUiIHN0cm9rZS13aWRnZXQ9IjEiIGZpbGw9InRyYW5zbGF0ZW4iIHN0cm9rZT0idHJhbnNsYXRlciI+PC91cz48L3N2Zz4="/> Is it ...

Ways to highlight a form field only when there is data in my variable

For the validation of email addresses in my form, I have been using a combination of php and ajax. The process involves sending the email value via jQuery to my php file and displaying a message if the email is found in the database. While my code function ...

Creating a PHP-enabled HTML button that spans multiple lines

Currently, I am working on creating a list of buttons with h5 text. The issue I'm facing is that all the buttons have the same width, but when the text exceeds this width, the button expands. I would like the text to span multiple lines without affect ...

Establishing the Time-to-Live (TTL) with Redis-OM and Node Object Mapping

Recently, I stumbled upon the exciting new Redis-OM Node Object Mapping feature. Although I have limited experience with Redis, I am eager to dive into it now. Currently, I have a basic function in place for creating rooms but I want these rooms to automa ...

Having trouble getting any output from my Jquery post function. Any suggestions?

I'm currently diving into the world of AJAX, but I'm facing challenges in retrieving the output from a PHP script. Below is the code snippet that I am working with: <form> <input type="text" id="url" name="url" value="" onkeydo ...

Revamp HTML <font size=1-7> with the use of CSS or JavaScript

I've been developing a prototype application that incorporates a plugin utilizing the deprecated HTML feature. Can I set custom pixel sizes for each font size ranging from 1 to 7? Currently, I'm contemplating using CSS zoom/scale properties, bu ...

transform the stationary drawing to the top and left position at coordinate (0,0)

Exploring canvas has led me to encounter a puzzling issue with the translate method. While working on this fiddle http://jsfiddle.net/claireC/ZJdus/4/, my goal was to have the drawing move and bounce off all four walls. However, I noticed that it would no ...

Counting each item with jQuery and assigning them numbers 02, 03, 04, etc., with the exception of the first item which will display as "Up Next

I'm still learning jQuery and here's the code I've put together after researching on stackoverflow and other platforms: var counter = 1; $('.next-page .nav-item').each(function () { if ($(this, ':gt(0)')) { $(this ...

Are you experiencing issues with your Ajax request?

I've been struggling to retrieve json data from an API. Despite my efforts, the GET request seems to be executing successfully and returning the correct data when I check the Net tab in Firebug. Can anyone offer advice on what could be going wrong or ...

Align two divs with text in the center

I am having trouble centering two divs horizontally and aligning them between each other. The issue arises when I add text of different sizes in each div. Here is an example: http://jsfiddle.net/DgEcs/1/ Why does the red div move down and how can this be ...