The jQuery fadeTo animation doesn't function properly on Internet Explorer 8

I'm experiencing an issue where the desired effect is working in Firefox but not in Internet Explorer 8.

Here is the webpage:

Please check the top 3 links in the header (right side) that should have spotlights fading in and out when hovering over them.

The fade effect seems to be working, but the graphic appears distorted. It is a transparent png image.

Below is the JQuery code:

$(document).ready(function() {
    $(".B1").hover(
        function() {
            $(this).stop(true, true).fadeTo(500, 1.00);
        },
        function() {
            $(this).stop(true, true).fadeTo(500, 0.00);
        }
    );

    $(".B2").hover(
        function() {
            $(this).stop(true, true).fadeTo(500, 1.00);
        },
        function() {
            $(this).stop(true, true).fadeTo(500, 0.00);
        }
    );


    $(".B3").hover(
        function() {
            $(this).stop(true, true).fadeTo(500, 1.00);
        },
        function() {
            $(this).stop(true, true).fadeTo(500, 0.00);
        }
    );

});

Here is the CSS styling:

.B1, .B2, .B3 {
    background: Transparent url(App_Themes/BlueGrey/Images/YearEndShow/Buttons-light-and-shadow.png) no-repeat;
    opacity: 0.0;
    filter: alpha(opacity = 0);
}

And here is the HTML structure:

<table style="width:600px; position:relative; top:-2px;">
    <tr>
        <td style="background:url(App_Themes/BlueGrey/Images/YearEndShow/buttons-yearendshow-info.png) no-repeat;"><div style="width:200px; height:120px; display:block;" class="B3"><a href="YearEndShow.aspx" style="width:200px; height:120px; display:block;"></a></div></td>
        <td style="background:url(App_Themes/BlueGrey/Images/YearEndShow/buttons-Artist-Info.png) no-repeat;"><div style="width:200px; height:120px; display:block;" class="B2"><a href="YearEndShowArtists.aspx" style="width:200px; height:120px; display:block;"></a></div></td>
        <td style="background:url(App_Themes/BlueGrey/Images/YearEndShow/buttons-Event-Info.png) no-repeat;"><div style="width:200px; height:120px; display:block;" class="B1"><a href="YearEndShowInfo.aspx" style="width:200px; height:120px; display:block;"></a></div></td>            
    </tr>
</table>

Any insights on why the graphic displays strangely?

Thank you!

Answer №1

I don't currently have access to Internet Explorer 8 to troubleshoot the issue you're facing, but it seems similar to a problem I encountered recently. You may find this link helpful: , which discusses issues with custom fadeIn/Out functions in IE.

The problem likely stems from IE's filter problems - try using a plugin to create a custom function like this:

$(".B1").hover(
    function() {
        $(this).stop(true, true).customFadeIn();
    },
    function() {
        $(this).stop(true, true).customFadeOut();
    }
);

Hopefully, this solution will resolve the issue for you.

Answer №2

In my experience, using the hover() function has been more successful with IE8 when dealing with transparent PNG images. I have created a demo that functions properly in both IE8 and Chrome 11 - http://jsfiddle.net/Ym8jL/1/

To better illustrate, I reorganized your CSS and HTML while eliminating redundancy.

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

use a jQuery function to submit a form

I have an HTML page with a form, and I want to display a specific div when the form is successfully submitted. The div code is as follows: <div class="response" style="display: none;"> <p>You can download it <a href="{{ link }}">here&l ...

Include keywords from .get when adding tags to the object for tagging

Implementing keywords as tags on my page has been a challenge, especially on the "Add" and "Edit" pages. I use a $ .get method to retrieve information when it comes to "Modify", but I'm facing an issue where it only works half of the time during page ...

Retrieving sender information using jQuery within a Bootstrap iframe modal

I'm trying to integrate a Google Map into a Bootstrap 4.0 Beta modal window. After coming across this helpful post and implementing the code successfully, I realized I lack the necessary expertise in jQuery to achieve the specific functionality I des ...

Are there any other potential factors that could lead to CSS files not being located within a Django project?

Apologies for asking the same question repeatedly. Despite trying for several days, I am unable to figure out where I went wrong. Can anyone provide guidance on my issue? I attempted to create a library program using Django. Below is the directory structu ...

Specification for dynamically changing CSS in Bootstrap tooltips

The default tooltip template in Bootstrap is a black box with white text. However, it is possible to modify the .tooltip css class to have a white background instead: .tooltip{position:absolute;display:none;color:#333;text-align:left;font-size:0.9em;width ...

Using Bootstrap to create HTML forms with Tabs that function as Radio Buttons

Currently, I am customizing a bootstrap template. One issue I am facing involves the form page, specifically with getting the selected Radio Button - which is actually a tablist - to POST to PHP. <div class="from-step-content"> <ul class= ...

Include the HTTP header in a GET request for an HTML hyperlink

Within my HTML code, I am using an <a> tag that will trigger a 302 redirect when clicked. However, I need to incorporate some HTTP headers into this GET request. Is there a way to achieve this without including the headers in the href attribute? Tha ...

Exploring the power of Jquery Ajax with REST, diving into nested lists and utilizing

When using Ajax/Rest/Jquery with Sharepoint lists, a common challenge arises when dealing with nested data structures. For example, if we have a list structure like List:Users -> Department -> Manager (where Manager is a People-Picker item in Departm ...

Can a hyperlink be generated to a webpage with quotation marks in the URL?

Is there a way to create hyperlinks to pages on my site that have double quotes in the page address? For example: <a href="mysite.com/search.php?q="sales+manager"&l=usa"></a> The above code only links to mysite.com/search.php?q=, which i ...

The download feature remains disabled following an AJAX request

Looking for a way to send exclusive music releases to big DJs and radio stations? The main feature needed is: Receiving feedback on the music before allowing downloads of the tracks! I have searched through numerous sites for an answer but haven't ...

Place a stationary element under another stationary element

I have a dilemma with two fixed elements on my website. One of them can toggle between display: block and display: none, while the other is always visible. I want both elements to stay at the top of the webpage without overlapping each other. I've co ...

How can I make a jQUery fadeIn effect triggered by the current URL

Imagine I provide a URL like example.php?mode=select&ID=1#age Can jQuery fadeIn be added based on the URL? This URL will be on a different page. When a user clicks on it, a page will load and the age field should fade in. If this is not possible, ar ...

Having trouble with logging in...where could the PHP error be hiding?

This HTML form includes: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" ...

Issue with insertBefore function causing rowIndex/nextSibling properties to not update as expected

While it may seem unimportant to experienced users, I recently started learning front-end JavaScript and am struggling with the behavior of the insertBefore function. My goal is simple: I want to duplicate a cell in a table when a button is clicked, and p ...

Maintain the expanded menu even after selecting a sub-item using jQuery

After conducting a thorough search, I was unable to find exactly what I needed. I have successfully implemented cookies on my menu so that when the page is reloaded, it remembers which menus were open. However, I noticed that clicking on a sub-item of Hy ...

The Backbone.js model attribute is mysteriously coming back as undefined, even though everything seems to be set correctly when

After experimenting with backbone for a few days, I seem to be struggling with understanding the sequence in which backbone ultimately assigns an attribute within a model. Below is the code snippet that I am working with: Contained in a model.js file - S ...

The function setCustomValidity() will continue to display even after the form has been successfully filled out

My form is very simple and I am trying to validate it using the required attribute: <form name="form"> <label for="Header">Title</label> <input type="text" class="span5" name="Header" ng-model="Message.header" placeholder="Title" on ...

Selecting a specific row in JqGrid based on a data value

I need to automatically select a row when the grid is loading, based on the data value of a specific column in that row. I am looking to select the row with invoice number IVAXVL18066996 (attached below). https://i.sstatic.net/2mC94.png I have been resea ...

How to ensure a div within an anchor tag occupies the full width in HTML and CSS?

In my code, I am working on creating multiple small boxes with images and centered text inside. The goal is to have these boxes clickable, where clicking the image will take you to a specific link. On desktop, I want a hover effect that darkens the image b ...

Using JavaScript to retrieve the updated timestamp of a file

Can JavaScript be used to retrieve the modified timestamp of a file? I am populating a webpage with data from a JSON file using JavaScript, and I want to display the timestamp of that file. Is there a way to do this using only JavaScript? ...