Added Reset Button
Included reset button to reset weight inputs, plates required, and plate visuals.
This commit is contained in:
@@ -206,6 +206,7 @@ p.subheading {
|
|||||||
.b-calulatorinputs__weightinput{
|
.b-calulatorinputs__weightinput{
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -289,6 +290,20 @@ input.input-calculate:focus{
|
|||||||
outline-style: none;
|
outline-style: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.b-infoentry__reset{
|
||||||
|
position: absolute;
|
||||||
|
top: 0px;
|
||||||
|
transform: translate(-132%, 132%);
|
||||||
|
color: #808285;
|
||||||
|
font-family: "Zilla Slab";
|
||||||
|
font-size: 14px;
|
||||||
|
font-style: italic;
|
||||||
|
font-weight: 500;
|
||||||
|
letter-spacing: 0.75px;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
.b-infoentry__dividerheading{
|
.b-infoentry__dividerheading{
|
||||||
display: block;
|
display: block;
|
||||||
margin: 16px auto;
|
margin: 16px auto;
|
||||||
|
|||||||
@@ -30,7 +30,6 @@
|
|||||||
<p class="browserupgrade">You are using an <strong>outdated</strong> browser. Please <a href="https://browsehappy.com/">upgrade your browser</a> to improve your experience and security.</p>
|
<p class="browserupgrade">You are using an <strong>outdated</strong> browser. Please <a href="https://browsehappy.com/">upgrade your browser</a> to improve your experience and security.</p>
|
||||||
<![endif]-->
|
<![endif]-->
|
||||||
|
|
||||||
<!-- Add your site or application content here -->
|
|
||||||
<div class="b-container" id="header">
|
<div class="b-container" id="header">
|
||||||
<a name="header"></a><div class="b-header">
|
<a name="header"></a><div class="b-header">
|
||||||
<div class="b-header__container">
|
<div class="b-header__container">
|
||||||
@@ -92,6 +91,7 @@
|
|||||||
<div class="b-calulatorinputs__weightinput">
|
<div class="b-calulatorinputs__weightinput">
|
||||||
<label for="Weight">WEIGHT (LBS)</label>
|
<label for="Weight">WEIGHT (LBS)</label>
|
||||||
<input type="number" inputmode="numeric" pattern="[0-9]*" class="b-infoentry__input input-element input-weight" name="Weight" placeholder="What are you lifting? (LBS)" id="Weight">
|
<input type="number" inputmode="numeric" pattern="[0-9]*" class="b-infoentry__input input-element input-weight" name="Weight" placeholder="What are you lifting? (LBS)" id="Weight">
|
||||||
|
<input type="button" name="reset" value="Reset" class="b-infoentry__reset">
|
||||||
<input type="button" class="b-infoentry__button submit-element input-calculate" name="Calculate" value="LIFT" onclick="startcalc()">
|
<input type="button" class="b-infoentry__button submit-element input-calculate" name="Calculate" value="LIFT" onclick="startcalc()">
|
||||||
</div>
|
</div>
|
||||||
<a href="#options">
|
<a href="#options">
|
||||||
|
|||||||
@@ -114,6 +114,19 @@
|
|||||||
} // End if
|
} // End if
|
||||||
});
|
});
|
||||||
|
|
||||||
|
//show reset button on calculate
|
||||||
|
jQuery(".input-calculate").click(function(){
|
||||||
|
jQuery(".b-infoentry__reset").show();
|
||||||
|
});
|
||||||
|
|
||||||
|
//reset inputs and plate visuals
|
||||||
|
jQuery(".b-infoentry__reset").click(function(){
|
||||||
|
jQuery(".input-weight, .input-weightsneeded").val('');
|
||||||
|
jQuery(".input-final, .input-difference").html('0');
|
||||||
|
jQuery(".b-platevisual__plates").html('');
|
||||||
|
jQuery(".b-infoentry__reset").hide();
|
||||||
|
});
|
||||||
|
|
||||||
//Saves scroll position on focus and restores
|
//Saves scroll position on focus and restores
|
||||||
var savedScrollTop;
|
var savedScrollTop;
|
||||||
function saveScroll() {
|
function saveScroll() {
|
||||||
|
|||||||
Reference in New Issue
Block a user