A Pen by Connor MacDonald on CodePen.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function switchLayouts(){ var featureToggleString = 'ft_override_enable_pdp_below_the_fold_layout'; | |
var url = new URL(window.location); | |
var params = params = new URLSearchParams(url.search); | |
var toggleValue = params.get(featureToggleString); | |
const isToggleOff = !toggleValue || toggleValue === 'OFF'; | |
params.set(featureToggleString, isToggleOff ? 'ON' : 'OFF'); | |
window.location.search = '?' + params.toString(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="container"> | |
<h1>Fibonacci Sequence</h1> | |
<form> | |
<div class="form-group"> | |
<label for="number"> | |
Fibonacci sequence number: | |
</label> | |
<input type="number" class="form-control" name="number" id="number" min="1" value="1" /> | |
<small class="form-text text-muted">Please enter a number in the fibonacci sequence where n > 0.</small> | |
</div> |