As said in jQuery Documentation ---. Show ()
Note. If you use ! important in their styles, for example display: none! important , you must override the style using .css ('display', 'block! important') if you want to use .show () to function correctly.
But it looks like the style cannot be overridden, and the element cannot be displayed. Am I something wrong here?
jsfiddle
When you use attr , it may work. jQueries .css() and .prop() both not work
attr
.css()
.prop()
In this attr script, remove !important from javascript and you will see how CSS !important overlaps even the inline style.
!important
your violin
Alternatively, you can do this using classes (so that all of your CSS is in the CSS files themselves and will not be directly modified by javascript): http://jsfiddle.net/FF3mc/4/
$('.classname').attr("style", "display: block !important");
We cannot use .css () here because it does not support! important.
Source: https://habr.com/ru/post/1440028/More articles:What is the reason DisplayFor ignores html attributes? - asp.net-mvchow to save downloaded files in a form before sending it using jsf-2 and primefaces-3.4 - javaRemoving a Python object - pythonJSON.NET \ how to combine two JSONs in JSon.net - c #Using Twitter bootstrap, how do I make the thumbnail (as in the thumbnail component) have the same height? - twitter-bootstrapBash script for creating custom sketches - linuxCan I use the Google Spreadsheet API to add a comment to a cell? - commentsNamed Pipe Performance Issues - c #Mongo Java drivers and mappers - mongodbThe "Action" tab below? - javaAll Articles