Possible duplicate:JQuery css: applying important styles
I have the following code:
$("body") .ajaxStart(function () { $(this).css({ 'cursor': 'progress' }) }) .ajaxStop(function () { $(this).css({ 'cursor': 'default' }) });
This works, but not when I was linking to a link where I have a hang and another cursor. Is there a way I can set the CSS cursor property above to a value using jQuery>
Try using this code, for example:
$(this).css({ 'cursor': 'default !important' })
$("body") .ajaxStart(function () { $(this).css({ 'cursor': 'progress !important' }) }) .ajaxStop(function () { $(this).css({ 'cursor': 'default !important' }) });
Just add !important after your property value:
!important
This is the syntax
How to apply! is it important to use .css ()?
Source: https://habr.com/ru/post/1433317/More articles:Do short-circuit operators run from left to right? - javaSave WebResponse as txt - c #iText avoids cutting tables when going to a page - javaCross-tab Crystal Reports, grouping by database field - sqlInstalling the Opera extension from the registry - operaChecking .Net assembly version - .netcan not get drag and drop use localstorage - javascriptMonospaced font for junit in eclipse? - javatornado warning [Errno 104] Connection reset by peer - pythonNode.js w / express error handling in callback - node.jsAll Articles