The functionality of hover and custom attribute is not operational on IE8

Unfortunately, I am facing issues with the hover and custom attribute functionality in IE8. Even in compatibility mode, it refuses to work properly. The code snippet provided (fiddle) works perfectly fine on Mozilla, Opera, Safari, and Chrome but encounters problems in IE8.

HTML

<ul>
    <li class="aniRunmated" bxTab="home_pane">Home</li>
    <li class="animated" bxTab="news_pane">News</li>
    <li class="animated" bxTab="project_pane">Project Outline</li>
    <li class="animated" bxTab="gallery_pane">Gallery</li>
    <li class="animated" bxTab="downloads_pane">Downloads</li>
    <li class="animated" bxTab="links_pane">Links</li>
</ul>

    <div id="home_pane" class="tabbed">Home</div>
    <div id="news_pane" class="tabbed">News</div>
    <div id="project_pane" class="tabbed">Project</div>
    <div id="gallery_pane" class="tabbed">Gallery</div>
    <div id="downloads_pane" class="tabbed">Downloads</div>
    <div id="links_pane" class="tabbed">Links</div> 

jQuery

$('li.animated').hover(function(){
        $(this).addClass('active');
    },function(){;
        $(this).removeClass('active');
});

$('[bxTab]').click(function(){
        $('.tabbed').css('display','none');
        $('#'+$(this).attr('bxTab')).css('display','block');
}); 

I have experimented with different versions of jQuery including 1.3.2 and 1.4.2 but none of them seem to resolve the issue.

Answer №1

$('li.animated').hover(function(){
        $(this).addClass('active');
    },function(){
        $(this).removeClass('active');
});

$('[bxTab]').click(function(){
        $('.tabbed').css('display','none');
        $('#'+$(this).attr('bxTab')).css('display','block');
}); 

A semicolon was removed. Grateful for the help.

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

Utilize Vue to condense cells within a table

I am attempting to create a schedule table using vue.js. Each row represents an activity (in this example, only one is hardcoded), and each column represents a time period. The cells contain the names of users if they are scheduled during that time. https ...

Defining colors in TinyCSS and GTK themes using the `@define-color

I've been working on a project that involves parsing GTK+3 themes using the TinyCSS library. However, it seems that TinyCSS is not recognizing lines such as @define-color base_color #FAFAFA; These definitions are stored in parser.styleSheets[0].er ...

table with flexible cell width and fixed table width

I've been troubleshooting this issue for days, but I just can't seem to find a solution! The problem lies within a table used on a webpage. If I don't specify table-layout, I can make one cell width dynamic, but I lose the ability to set &a ...

The Bootstrap 3.3 Carousel is stationary and does not rotate

I am facing a challenge with implementing a Carousel using Bootstrap version 3.3.7 on my website. The code snippet is as follows: <!-- Carousel ================================================== --> <div class="row dark-start d-none d-lg-block"&g ...

Ways to update or incorporate new data within JavaScript

I'm currently experimenting with ways to incorporate additional text or even AdSense into what I believe is a .js file. There's an operational lightbox feature with a descriptive caption at the bottom, and that caption is what I want to modify. ...

Increasing the identifier of duplicated input fields using jQuery

There is a specific section in my form that consists of a select box and three checkboxes, which needs to be duplicated on request. While I have successfully cloned the div and incremented its specific div, I am facing challenges in incrementing the checkb ...

The problem of asynchronous communication in Ajax

Currently, I am in the process of developing a mobile application using backbone.js. The main functionality of the app involves users selecting football players for a team. To enhance user experience, I aim to implement a feature that remembers player sele ...

Dealing with an unexpected quantity of parameters in a jQuery.when.apply situation

Being new to programming in JavaScript, I am looking for a way to trigger multiple requests while preserving the order and ignoring any errors. After researching the documentation and code, I have come up with the following pattern: var requests = []; for ...

What is the reason my hyperlinks are not clickable?

I'm working on a project that checks if a Twitchtv user is live streaming and provides a link to their page. The streaming part is working correctly, but I'm having trouble making the username clickable. Even though the URL is valid and the page ...

PHP Retrieve Current Time with AM/PM Display

Can anyone help me figure out how to use PHP to get the current time along with AM/PM indication? The code I have doesn't seem to be working correctly. Here is the code snippet that I am currently using: $format1 = date("G"); // this should give the ...

Customizing the appearance of the datatable search bar

I've been attempting to customize the appearance of the "Search" text and input field, but they are not responding to my CSS changes. Upon inspecting the elements, I noticed that the datatable filter and info sections have similar styles. Although my ...

Using ajax to submit a request to the controller

I'm currently developing an ASP.NET Core MVC application and have a registration page set up. My goal is to return View with errors if the model state is false: @model WebApplication2PROP.Entities.UserRegister @* For more information on enabling M ...

Customize the design of a React Material-UI select dropdown by overriding

I am currently utilizing the React MUI Select Component for my forms, specifically for language selection. My issue arises when I need a different style for the dropdown menu of the language Select component. Overriding the relevant class would apply this ...

Having trouble populating two linked html dropdowns with JSON data using jQuery?

My attempt to populate two HTML selects with JSON data is resulting in an error: Uncaught TypeError: country.map is not a function when trying to populate the cities. Can anyone point out the issue with the code? $(document).ready(function() { let $co ...

I encountered a frustrating issue with saving user input data using localStorage

One of my goals is to store the current inputs even if the user refreshes or closes the browser. The issue I'm facing is that when I select Yes in the radio button, then refresh the page or close the browser and reopen it, the No button is checked wh ...

Verify that all images retrieved through AJAX have finished loading before proceeding

Is there a way to ensure all images in the HTML loaded via AJAX are fully loaded before performing an action like displaying them? I've experimented with various methods, including using the 'imagesloaded' plugin. var page = 'P40&apos ...

Next.js - Anticipated that the server HTML would include a corresponding <div> within <div> tag

For a live demonstration, please click here In my current project, I am experimenting with creating a simple layout that adjusts based on the user's screen size. Specifically, on mobile devices, only the latest posts should be displayed. On desktops, ...

The display of table headers varies in IE7

I am experiencing an issue with a table that has headers, each containing a span element with a background image serving as a separator between the column headers. While the display looks correct on most browsers, on IE7 the separator image (which is with ...

What is the best way to trigger the onclick event before onblur event?

I have two elements - an anchor with an onclick function and an input with an onfocus event. The anchor is toggled by the input button; meaning, when the button is in focus, the anchor is displayed, and when it loses focus, the anchor is hidden. I'm l ...

What happens when an AJAX request doesn't have a success field?

Is it possible to execute an ajax call without specifying a success function? $.ajax({ type: "POST", url: "/project/test/auto", data: data, // no success function defined here }); My reasoning for this is that I have PHP code that insert ...