Eliminate the hover and click effects on buttons

I'm trying to change the hover and click states of a jQuery Mobile button, but my current CSS override doesn't seem to be working as expected.

Here's the button code I have:

<a class="aButton" href='#' data-role="button" data-icon="check">My Button</a>

Despite using this CSS override that targets various button classes, the button still highlights when clicked or hovered over. I've tried everything to remove this highlighting effect, but haven't been successful so far. Can someone please help me troubleshoot this issue?

.ui-btn, a, .aButton, .ui-btn-a, .ui-btn-b, .ui-btn-c, .ui-btn-d, .ui-btn-e, .ui-btn-down-a, .ui-btn-down-b, .ui-btn-down-c, .ui-btn-down-d, .ui-btn-down-e, .ui-btn-hover-a, .ui-btn-hover-b, .ui-btn-hover-c, .ui-btn-hover-d, .ui-btn-hover-e {
    background: -moz-linear-gradient(#DDDDDD, #CCCCCC) repeat scroll 0 0 #030303 !important;
}

Answer №1

employ :hover along with :active

for example: .aButton:active{ /* styles */ }

Answer №2

It suddenly dawned on me that I had made a silly mistake. The background was not showing up at all because I mistakenly used -moz-linear-gradient instead of -webkit-linear-gradient on my Android phone... oops!

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

Updating the DOM through Long Polling allows us to maintain existing attributes in jQuery Plugin

UPDATE: The functionality is all set; the pushes are working. The only issue I'm facing is that each push resets the #load_info div to empty. Is there a way to retain the original content inside the div, even though the content will be an updated vers ...

Javascript function fails to trigger when clicked

<body ng-app="starter"> <ion-pane> <ion-header-bar class="bar-dark"> <h1 class="title">AppifyLife</h1> </ion-header-bar> <ion-content> <center><div class="card" id="life"><h3>20< ...

Loading dynamic CSS on WordPress frontend only

I am facing an issue with the dynamic css file in my WordPress theme that is loaded using Ajax. The problem is that it also loads this dynamic css file for the backend. Can someone help me modify my code so that it only loads the dynamic css file for the f ...

Press on the button that is currently in your field of view

I have a web page with multiple buttons inside div elements. I am looking to automate the process of clicking the "Buy" button that is currently visible on the screen when the user presses the B key. $(document).keydown(function(e) { if (e.keyCode == ...

Adaptable and scalable

Hello everyone, I could use some assistance in identifying where I may have made errors. Can you please help me with that? I am aiming to enhance the responsiveness of the following design for mobile devices. <section class="hero"> ...

Exploring the World of ASP MVC and Jquery ajax Search

Recently, I created a code for an ajax search function that retrieves user information. In the Controller section: public JsonResult SearchPeopleByName1(string keyword) { System.Threading.Thread.Sleep(2000); ApplicationDbContext myDbConte ...

Leveraging jQuery for performing the "contains" function

Is it possible to use jQuery to search for a specific string within an array of strings? Can jQuery be used for this purpose? ...

Switching visual representation that appears upon clicking the dropdown menu

Issue with Duplicating Dropdown and Image Change const image = document.querySelector('.item__img'); const checkbox = document.querySelectorAll('.imgOption'); function handleChange() { let imgsrc = this.getAttribute("data-value ...

When an element with a border attribute is hovered over, it shifts position

When I hover over an li-element, I want to apply borders at the top and bottom. Here's the code snippet: #overview li:hover { background: rgb(31, 31, 31); border-top: 1px solid white; border-bottom: 1px solid white; } Check out this JSFi ...

ways to add spacing between bootstrap columns

I am currently using Bootstrap 5 and I'm trying to create a row with 6 columns. I have added gutter in the row but for some reason, the spacing between the columns is not being applied. Can anyone help me figure out what I'm doing wrong here? Bel ...

What is the best way to horizontally align my div content while ensuring it is responsive, alongside a sidebar and top menu on the same

I am facing an issue trying to center my div content responsively with a sidebar menu and a top menu using Bootstrap. However, when I require the side-menu file, my div content gets placed at the bottom of the page unexpectedly. I am only using Bootstrap 5 ...

Tips for choosing a particular list item using jQuery: retrieve the attribute value of 'value' and showcase it on the webpage

I have a task that requires the following: Implement an event listener so that when you click on any list item, the value of its "value" attribute will be shown next to this line. In my HTML, I have an ordered list with 8 list items. The values range fro ...

Tips for limiting access to data from various tabs when the web page first loads

div#tabCtrl div#page1 This table showcases the information for tab1 div#page2 This table showcases the information for tab2 ...

Combine JQuery and backbone for enhanced functionality

I am currently using Backbone and Dyson to simulate an API. I'm attempting to display the results of the JSON but I encountered an error: Uncaught TypeError: self.template is not a function. ReservaCollectionView = Backbone.View.extend({ initialize: ...

What is the trick to getting boxes to overlap the div element?

I'm currently designing a webpage with 3 columns in a div row, and I want them to overlay the div element. How can I achieve this effect? I have experimented with flexbox, z-index positioning, etc., but so far, I haven't been successful. Here is ...

Placing a video as the background of a div element and ensuring the text appears in the

I'm facing a challenge with setting my text background as a video. Despite my efforts, the text remains hidden behind the video and doesn't come to the front. Additionally, I'm encountering an issue where the video background does not adapt ...

Manipulating graphics with CSS - dynamically linking Divs

I'm attempting to create a unique design by connecting a series of dynamically generated content divs with CSS. The goal is to have a curved line every three divs, complete with an arrow image at the end and an additional line to separate the contents ...

Adding a new row to a table is causing issues with jQuery

var info = [{ "pin": "015-08-0011-000-01", "arp": "015-08-0011-000-01", "tin": "342-432-423-000", "firstname": "John", "middlename": "James", "lastname": "Jones", "suffix": "", "qtr": "1st ...

Tips for modifying a HTML table to switch one column with 60 rows to three columns with 20 rows dynamically

Need assistance with separating a dynamically loaded single-column HTML table of 60 rows into three columns of 20 rows each using jQuery in JSP. For example, starting with the loaded table: test 1 test 2 test 3 test 4 test 5 test 6 test 7 test 8 test 9 t ...

Addressing a jquery.ajax relative path problem

I am a newcomer to this topic and I have been researching extensively online for more information. I would like some further insight into the following issue: I am attempting to retrieve a JSON file located one level down from the directory where `index.h ...