Is it possible to customize the background color and border weight using input fields in my script?
I'm not very familiar with JavaScript, so if you could provide an example on JSFiddle, I would greatly appreciate it.
$('.divSpecific input').click(function(){
if($(this).attr("alt") == "1")
$('div.signUp').css("background","red").css("color","black");
else if ($(this).attr("alt") == "2")
$('div.signUp').css("background","yellow").css("color","black");
else
$('div.signUp').css("background","cyan").css("color","white");
});
div.divSpecific {
height: 20px;
}
.signUp{
border:solid 1px;
height:20px;
width:100px;
text-align:center;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<div>First step - choose button</div>
<div class="divSpecific">Design - ver.1<input type="radio" alt="1" name="name" /></div>
<div class="divSpecific">Design - ver.2<input type="radio" alt="2" name="name" /></div>
<div class="divSpecific">Design - ver.3<input type="radio" alt="3" name="name" /></div>
<br>
<div>Or change background, text, and border colors manually (HEX format)</div>
<div>Background color<input type="text"><input type="submit" value="Confirm">
<div>Text color<input type="text"><input type="submit" value="Confirm"></div>
<div>Border color <input type="text"><input type="submit" value="Confirm"></div>
<br>
<div>Adjust border weight</div>
<div>Border weight (default 1 px)<input type="text"><input type="submit" value="Confirm">
<br><br>
<div class="signUp">Sign Up</div>