How can I make a Modal pop-up draggable and change the color of the "Ok" and "Cancel" buttons on hover using a single CSS class?
.hidModal{
position: fixed;
font-family: Arial, Helvetica, sans-serif;
top: 0;
right: 0;
bottom: 0;
left: 0;
background: rgba(0,0,0,0.2);
z-index: 500;
opacity:2;
-webkit-transition: opacity 400ms ease-in;
-moz-transition: opacity 400ms ease-in;
transition: opacity 400ms ease-in;
}
.windowModal {
width: 400px;
top:15%;
position: fixed;
margin: 10% auto;
padding: 5px 20px 13px 20px;
border-radius: 10px;
background:rgba(255, 204, 153,0.2);
z-index: 501;
opacity:0.5;
background: -moz-linear-gradient(#ffe6cc, #ffa64d);
background: -webkit-linear-gradient(#ffe6cc, #ffa64d);
background: -o-linear-gradient(#ffe6cc, #ffa64d);
}
#winMod{
position: relative;
}
.windowModal:hover{
opacity: 1.0;
}
.closeMod {
background: #606061;
color: #FFFFFF;
line-height: 25px;
position: absolute;
right: 5px;
text-align: center;
top: 4px;
width: 24px;
text-decoration: none;
font-weight: bold;
-webkit-border-radius: 12px;
-moz-border-radius: 12px;
border-radius: 12px;
-moz-box-shadow: 1px 1px 3px #000;
-webkit-box-shadow: 1px 1px 3px #000;
box-shadow: 1px 1px 3px #000;
}
.closeMod:hover {
background: #aaaaaa;
color: #ff0022;
cursor: pointer;
}
.bttnMod {
background: #606061;
color: #FFFFFF;
line-height: 15px;
text-align: center;
width: 50px;
text-decoration: none;
font-weight: bold;
-webkit-border-radius: 12px;
-moz-border-radius: 12px;
border-radius: 12px;
-moz-box-shadow: 1px 1px 3px #000;
-webkit-box-shadow: 1px 1px 3px #000;
box-shadow: 1px 1px 3px #000;
}
.bttnMod:hover {
background: #00d9ff;
cursor: pointer;
}
<div class="hidModal">
<div id="winMod" class="windowModal">
<div style="margin-top: 1%;">
<input class="closeMod" type="button" name="Close" value="X" style="width:8%" onclick="winClose();" >
<div style="margin-top: 1%;">
<label class="label lblwidth1"> </label>
<input class="bttnMod" type="button" name="OK" value="OK" onclick="clickok();" tabindex="1" style="width:50">
<input class="bttnMod" type="button" name="Cancel" value="Cancel" tabindex="2" style="width:55" onclick="winClose();">
</div>
</div>
</div>
I have attempted different solutions using jQuery, but without success due to my limited knowledge in that area. Any assistance in solving this issue would be greatly appreciated. Thank you in advance.