JQuery CSS Dodaj ważne
$('#elem').attr('style', 'width: 100px !important');
Witty Wasp
$('#elem').attr('style', 'width: 100px !important');
<HTML>
<HEAD>
<SCRIPT SRC="http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js">
</SCRIPT>
<SCRIPT>
WRITE YOUR JQUERY CODE HERE!!!
</SCRIPT>
<STYLE>
.yellowDiv{
background-color:yellow;
margin: 10px 0 0 0;
height:50px;
}
.impPrg{
font-size:16px;
font-weight:bold;
}
</STYLE>
</HEAD>
<BODY>
<H1>Demo: jQuery addClass() method</H1>
<BUTTON ID="btnAddDivClass">Add <DIV> class</BUTTON>
<BUTTON ID="btnAddPClass">Add <P> class</BUTTON>
<DIV ID="myDiv">
<P>This is first paragraph.</P>
</DIV>
<DIV>
<p>This is second paragraph.</P>
</DIV>
<DIV>
<P>This is third paragraph.</P>
</DIV>
</BODY>
</HTML>