Are there any known issues with Firefox, jQuery, and CSS animations working in tandem?

As I develop a website with jQuery to manage CSS class switching for animations, I have encountered a strange issue. While Google Chrome and Internet Explorer 9/10 work perfectly, Firefox (Aurora 24 and Firefox 23) does not perform the animations smoothly, although the functionality remains intact.

For example, when clicking a button to hide one box and show another, Chrome smoothly transitions between the two, while Firefox lacks the smooth transition. Surprisingly, manually changing the CSS value through the console seems to trigger the animation.

The site features around 10 simultaneous animations, with only 5 of them functioning properly. Disabling the heaviest 3 animations resolves the problem, suggesting a potential overload issue in Firefox.

I regret that I cannot provide a JSFiddle as creating one results in it working fine without showing the problem.

The problematic code snippet is:


console.log("3D Accelerated animation");        

console.log("oldpage = "+oldpage+"\npage = "+page+"\nnewpage = "+newpage);

if(oldpage != newpage) eoldpage.removeClass("active"); 
$(".slider > li").attr("style", "").removeClass("animation");

epage.css({"transform": "translate3d(0, 0, 0)"});

enewpage
.css({"transform": "translate3d(" + pagew * db + "px, 0, 0)"})
.addClass("active");

eboth.addClass("animation");

enewpage.children("section").load('/pages/' + newpage + ".php?lang=" + lang, function() {

    var hmorpher = enewpage.children().height();
    $("#heightmorpher").css({"height": hmorpher});
    $(".parallax").css({"height": Math.pow(hmorpher + 200, 600)});

    epage.css({"transform": "translate3d(" + (pagew * da * 2) +"px, 0px, 0px)"});
    enewpage.css({"transform": "translate3d(0px, 0px, 0px)"});


    $("body").removeClass("active");

});

Although it may be hard to grasp without a functional example, this code snippet animates a page slider where the current page slides left or right based on its position relative to the newly requested page, which simultaneously slides in from the opposite direction. To achieve this, I utilize the following plugin: https://github.com/zachstronaut/jquery-css-transform.

I seek insight into whether this behavior reflects a known bug in Firefox.

Edit:

To view a live demo of the page, visit:

Please note that due to exporting via "Save page as...", the demo may exhibit some bugs. Click on the FIRST CLICK ME!! menu entry and then try toggling between the two CLICK ME menu entries.

In response to discussions about vendor prefixes:

This Fiddle demonstrates Firefox's support for the non-prefixed version, indicating that the issue lies elsewhere:

http://jsfiddle.net/3wM2V/1/

Answer №1

It seems like the problem lies in your utilization of the CSS3 property -webkit-tranform, as it is only compatible with "webkit" browsers.

Instead, ensure that you include all browser-specific rules:

-webkit-transform: translate3d(0px, 0px, 0px);  /* Chrome, Safari 3.1+ */
-moz-transform:    translate3d(0px, 0px, 0px);  /* Firefox 3.5-15 */
-ms-transform:     translate3d(0px, 0px, 0px);  /* IE 9 */
-o-transform:      translate3d(0px, 0px, 0px);  /* Opera 10.50-12.00 */ 
transform:         translate3d(0px, 0px, 0px);  /* Firefox 16+, IE 10+, Opera 12.10+ */

You can also utilize this website for assistance, as it generates css3 code with the specific browser prefixes.

I hope this information proves beneficial to you :)

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

Escaping the iframe barrier to show a pop-up modal on the main parent page

My current challenge is to make a modal window appear outside of an iframe when a user clicks on an image within the iframe. This modal will display a video on the main parent page. I have some code in place, but I need help implementing the JavaScript to ...

Updating the video tag's source attribute using JSON information

I am in the process of creating a unique video player using HTML and Javascript that will sequentially play a set of videos until all 6 have been displayed. The URLs for these videos are stored within an array that is mapped in a .json file named clips.jso ...

What is the best method for preserving HTML content using Ajax?

I am having difficulty storing HTML code in a database using AJAX. Despite having the correct connection information, I am unable to write to the table. <div id="others"> <div id="name"><input type="text" name="results" class="name"> ...

Default page featuring an AngularJS modal dialog displayed

I am attempting to display a modal popup dialog using an HTML template. However, instead of appearing as a popup dialog, the HTML code is being inserted into the default HTML page. I have included the controller used below. app.controller('sortFiles&a ...

An issue has been identified where a single image is not displaying properly on Android devices, as well as IE7 and

Hey there! I recently created a Wordpress site and it seems that the Art Below logo isn't appearing in IE7, IE8, and Android for some reason. Would anyone be willing to help troubleshoot this issue? If you have fresh eyes, please take a look at the f ...

Removing a Child Object from a JSON Object in AngularJS

Encountering an error while attempting to remove a Child object Error Message: TypeError: ctrl.otsact.tests.splice is not a function HTML : <tr ng-repeat="act in ctrl.otsact.tests" ng-if="ctrl.editToggle"> <td><span ng-click="ctrl.r ...

Is there a way to extract information from my JSON file and display it on my website?

My aim is to populate my HTML page with data from a JSON file. Approach I created a JavaScript file: update-info.js In this file, I used an AJAX call to retrieve data from my JSON file data.json If the request is successful, I utilized jQuery's .htm ...

Need to wait for current thread execution in jQuery for synchronous AJAX call

Utilizing jquery ajax for a save operation: $.ajax({ type: "POST", url: "/service/save.php", data: dataString, cache: false, async: true, // Avoid using 'false' as it is deprecated success: function(result){ var split = result.s ...

Is there a variance in outcomes between constructing a pattern with a string and constructing a pattern with a regular expression "literal" in JavaScript?

Are there any distinctions between using RegExp literals versus strings? http://jsfiddle.net/yMMrk/ String.prototype.lastIndexOf = function(pattern) { pattern = pattern + "(?![\s\S]*" + pattern + ")"; var match = this.match(pattern); ...

TypeScript interface with an optional parameter that is treated as a required parameter

Within my interface, I have a property that can be optional. In the constructor, I set default values for this property, which are then overridden by values passed in as the first parameter. If no properties are set, the defaults are used. I am looking fo ...

Ways to access Angular controllers from various folders

Yesterday, I dove into learning my first node.js/MEAN application and stumbled upon this helpful tutorial to kick-start my journey: https://scotch.io/tutorials/creating-a-single-page-todo-app-with-node-and-angular After following the tutorial and successf ...

Incorporating JavaScript Object-Oriented Programming in PHP

As someone new to JS programming, I am tasked with developing a php web application that relies on ajax calls for all actions without reloading the page. While I have completed the php and JS code, I am struggling to understand what JS OOP entails. My coun ...

Node JS encountered an unhandled promise rejection warning, while React received a preflight response

Working with React JS: Take a look at the code snippet below: ....some code...... verifyTokenResults = await axios.post('http://localhost:5000/otp/token/verify', {accessToken: authToken}) Here, I am sending a token from a React component to a ...

What is the best way to indicate a particular element within a subdocument array has been altered in mongoose?

I have a specific structure in my Mongoose schema, shown as follows: let ChildSchema = new Schema({ name:String }); ChildSchema.pre('save', function(next){ if(this.isNew) /*this part works correctly upon creation*/; if(this.isModifi ...

Utilize Aframe to easily view and upload local gltf files

I've been working on a project to create a user-friendly panel for loading and viewing gltf models in real-time in A-frame. Here is the current workflow I am following: Using the input tag to load files from local storage. Using v-on-change to assi ...

When attempting to execute "nodemon," the command was not detected

When trying to use 'nodemon' in the command line, an error occurs stating that it is not recognized as a cmdlet, function, script file, or operable program. The system suggests checking the spelling of the name and verifying that the path is corr ...

Tips for changing the state of a toggle button with JavaScript

I need help creating a toggle button. To see the code I'm working on, click here. In my JavaScript code, I am reading the value of a 'checkbox'. If the value is true, I add another div with a close button. When the close button is clicked, ...

Please include the document with a name that contains spaces

I am facing an issue where I cannot attach files with spaces in the name. However, when a file with no space in the name is successfully attached. I am using CodeIgniter for this purpose, uploading the file to the server before attaching it. I use the help ...

Ways to enhance a Vue component using slots

I am looking to enhance a third-party library component by adding an extra element and using it in the same way as before. For example: <third-party foo="bar" john="doe" propsFromOriginalLibrary="prop"> <template v ...

What could be causing certain link titles to appear outside of my <a> tags?

Check out this jsbin link to see the issue I am facing. I noticed that some of my link titles are appearing outside the anchor tags. Initially, I thought it was because some titles were enclosed in double quotes. I tried creating a function to fix this, b ...