Iceweasel 31.2 is having trouble executing basic CSS code

Currently working on a website for a family member, I have created a section that starts off hidden (display: none) and fades in when the user clicks anywhere on the page.
The functionality is smooth on Chromium, however, when testing it on Iceweasel 31.2, the CSS for the fading-in section fails to load.

This is the JavaScript function triggered by the click event:

var openGallery = function(){
    $('section, nav, #topleft').fadeOut(400);
    $('#gallerie').toggle();
}

Here's the associated CSS:

#gallerie {
   position: relative;
   height: 874px;
   width: 1152px;
   background-color: rgba(0,0,0,0.2);
   border-radius: 5px;
   margin: auto;
   text-align: center;
}

#gallerie img:first-of-type {
   max-width: 1100px;
   max-height: 720px;
   display: block;
   margin-left: auto;
   margin-right: auto;
}

.close {
   display: inline-block;
   position: absolute;
   right: 5px;
   top: 5px;
}

.left, .right {
   position: static;
   top: 746px;
}

Lastly, here's the HTML content that appears and disappears (note that the JS part is generated by some PHP):

<div id="gallerie">
<script type="text/javascript">
var collection = [
    // "FILENAME" | "NAME" | WIDTH | HEIGHT
    ["6ème arrondissement-73 X 60.JPG","6ème arrondissement",1535,1832],
    (more data...)
    ["Sur la neige-55 X 46.JPG","Sur la neige",1853,1562]
]
</script>
    <h3>Gallery</h3>
    <figure>
        <img src="data/paintings/6ème arrondissement-73 X 60.JPG" class="big" title="6ème arrondissement" alt="0">
        <figcaption>6ème arrondissement</figcaption>
        <img src="images/left.png" alt="left" class="left" title="left"><img src="images/right.png" alt="right" class="right" title="right">
    </figure>
    <img src="images/close.png" class="close" title="Close window">
</div>

If anyone has insight on where the issue might be coming from, your assistance would be greatly appreciated. Thank you.

Answer №1

In my opinion, utilizing JQuery to toggle between class events and leveraging them for transitions would be the way to go. Currently, CSS3 is highly compatible across various browsers.

Instead of simply using:

$('section, nav, #topleft').fadeOut(400);

I suggest incorporating CSS code that manages the fade effect through a transition.

Feel free to explore the pen I crafted to witness this effect. You have the option to utilize toggleClass(), addClass(), or removeClass() as needed.

http://codepen.io/brycesnyder/pen/LEPJZh

EDIT: Using .toggle() may result in an undesirable effect; what I intended was .toggleClass().

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 retrieve the outcome of a node-sqlite3 query beyond the scope of db.get()?

I'm attempting to validate whether the sha256 hash stored in my sqlite database corresponds with the sha256 hash of the password that the user transmitted to my NodeJS server. The Auth() method is meant to deliver either a true or false result. Is the ...

What is the best way to incorporate Google Closure Stylesheet renaming when using an external Javascript Library like jQuery?

I've been exploring Google's feature for renaming stylesheets and I'm a bit confused about how to update my jquery selectors accordingly. The documentation didn't provide much clarity on this issue. If my code currently looks like this ...

Is there a way to verify if the password entered by the user matches the input provided in the old password field?

I am trying to compare the user's password with the one entered in the "oldPassword" input field. The challenge is hashing the input from the "oldPassword" field for comparison. How can I achieve this? Please review my ejs file and suggest improvement ...

What is the best way to create a function that can disable console.log and be imported into other React files for easy access?

Here is the content of my static.js file: var Helper = { console.log: function(){ }, Login: function(){ var name; var password; //rest of the code } } module.exports = Helper; Now, in my test.js file: var Helper ...

Handling the same form button repeatedly in a loop using jQuery

I have successfully set up jquery to accept form data and send it to flask, but I am facing two issues: It only accepts the first form, which has the same IDs repeated for each element. I want all forms to be able to submit. When a submission occurs, it ...

Tips for fixing the error message "Unhandled Promise Rejection: TypeError: response.body.forEach is not a function" in Vue.js 2

Here is how my Vue.js component looks: <script> export default{ name: 'CategoryBsSelect', template: '\ <select class="form-control" v-model="selected" required>\ <option v-for="option in opt ...

What could be causing my Material UI Table to disappear when I toggle the "Show" option?

I am incorporating the Grow material ui component to display or hide a table. Initially, the table is visible. https://i.sstatic.net/0OxPQ.png <Box className={classes.object_controls_wrapper}> <Box sx={{ display: "flex" }}> ...

Update the browser value using AJAX without the need to refresh the page

After retrieving a value from an XML file using ajax jquery, I encountered an issue. When I change the value in my XML file, it does not automatically update in the browser. <?xml version="1.0"?> <count><number>5</number></count ...

Using query strings to manipulate the URL of an iframe and add additional information

I am facing a challenge with integrating my legacy perl application into an MVC application. I have set up a structure where the legacy application is loaded into an iframe within default.aspx, but I need to capture the URL of each page within the iframe a ...

Erase text from an ASP TextBox within a user control by utilizing jQuery on the main page

I am facing a challenge with an ASP .NET webpage that contains dynamically generated user controls (multiple instances of a single control) within multiple repeaters. Each user control has a text box, and I want to clear its content using an HTML button lo ...

Guidelines for incorporating a router into the title of a Vuetify.js toolbar

I am currently utilizing vuetify.js in my project and I encountered an issue. I wanted the application title to link to the top menu, but when navigating to /route shop and /discount, the HogeHoge button's state changed unexpectedly. Is there a soluti ...

What is the best way to assign the value of a random array element to my state variable?

Currently, I am attempting to choose items randomly from my 'items' array. How can I assign the randomly selected item as the value of the 'randomItem' state? Here is my progress so far. var items = ['joe', 'joe', &a ...

The Threejs Blender exporter is exporting in an incorrect format

I'm attempting to convert a blender model into a threejs JSON format using the provided blender exporter. However, when I try to parse the JSON file, I encounter an error: Uncaught TypeError: Cannot read property 'length' of undefined The ...

There seems to be a problem with the functionality of Angular Routes

Error in app.js: I am facing an issue while setting up routes in my AngularJS application. When I click on 'Page 1', the URL should be '/employees' but it is showing as http://localhost:3000/#!#employees. Can someone please help me debu ...

The scene is filled with meshes, but all that can be seen is the renderer's clear color

I am currently experimenting with Three.js and jQuery to develop a small visual application. My main objective is to display all the meshes I have on the screen. The Issue: Unfortunately, none of the meshes are visible on the screen at all. Observations: ...

Eliminate spacing in MaterialUi grids

As I work on a React project, I am faced with the task of displaying multiple cards with content on them. To achieve this layout, I have opted to use MaterialUi cards within Material UI grids. However, there seems to be an issue with excessive padding in t ...

Selecting the next element in the DOM using Javascript

Here is the structure of my current setup: <div class="wrapper"> <div class="first"> <a class="button" href="">click</a> </div> <div class="second"> <div class="third"> S ...

The "getJson" function fails to execute when attempting to run a Python

I've come across a simple code snippet, but for some reason, my getjson function isn't working as expected. My Python script properly prints a JSON encoded value. Does anyone have any suggestions? HTML <!DOCTYPE html> <html> <h ...

The functionality of Node.js's hasOwnProperty method fails to return true even for existing properties

When a user logs into my Node.js Express application using Passport, their user object is saved in the request. Here is an example of what the user object may look like: { "uuid": "caa5cb58-ef92-4de5-a419-ef1478b05dad", "first_name": ...

Why do static files in Node.js + Express.js on Windows take up to two minutes to load?

I'm encountering an issue in my Windows environment with Node.Js/Express.js where static JS files can sometimes be labeled as 'pending' in the browser (even with caching disabled) for up to two minutes before finally downloading successfully ...