``````<div class="rb-box">

<p>1. On a scale of 1 to 5 how cubic are you?</p>
<div id="rb-1" class="rb">
<div class="rb-tab rb-tab-active" data-value="1">
<div class="rb-spot">
<span class="rb-txt">1</span>
</div>
</div><div class="rb-tab" data-value="2">
<div class="rb-spot">
<span class="rb-txt">2</span>
</div>
</div><div class="rb-tab" data-value="3">
<div class="rb-spot">
<span class="rb-txt">3</span>
</div>
</div><div class="rb-tab" data-value="4">
<div class="rb-spot">
<span class="rb-txt">4</span>
</div>
</div><div class="rb-tab" data-value="5">
<div class="rb-spot">
<span class="rb-txt">5</span>
</div>
</div>
</div>

<p>2. On a scale of 1 to 5 how would you rate the universe?</p>
<div id="rb-2" class="rb">
<div class="rb-tab" data-value="1">
<div class="rb-spot">
<span class="rb-txt">1</span>
</div>
</div><div class="rb-tab rb-tab-active" data-value="2">
<div class="rb-spot">
<span class="rb-txt">2</span>
</div>
</div><div class="rb-tab" data-value="3">
<div class="rb-spot">
<span class="rb-txt">3</span>
</div>
</div><div class="rb-tab" data-value="4">
<div class="rb-spot">
<span class="rb-txt">4</span>
</div>
</div><div class="rb-tab" data-value="5">
<div class="rb-spot">
<span class="rb-txt">5</span>
</div>
</div>
</div>

<p>3. On a scale of 1 to 5 how much do you like stalactites?</p>
<div id="rb-3" class="rb">
<div class="rb-tab" data-value="1">
<div class="rb-spot">
<span class="rb-txt">1</span>
</div>
</div><div class="rb-tab" data-value="2">
<div class="rb-spot">
<span class="rb-txt">2</span>
</div>
</div><div class="rb-tab rb-tab-active" data-value="3">
<div class="rb-spot">
<span class="rb-txt">3</span>
</div>
</div><div class="rb-tab" data-value="4">
<div class="rb-spot">
<span class="rb-txt">4</span>
</div>
</div><div class="rb-tab" data-value="5">
<div class="rb-spot">
<span class="rb-txt">5</span>
</div>
</div>
</div>

<p>4. On a scale of 1 to 5 what is your favorite color in the alphabet?</p>
<div id="rb-4" class="rb">
<div class="rb-tab" data-value="1">
<div class="rb-spot">
<span class="rb-txt">1</span>
</div>
</div><div class="rb-tab" data-value="2">
<div class="rb-spot">
<span class="rb-txt">2</span>
</div>
</div><div class="rb-tab" data-value="3">
<div class="rb-spot">
<span class="rb-txt">3</span>
</div>
</div><div class="rb-tab rb-tab-active" data-value="4">
<div class="rb-spot">
<span class="rb-txt">4</span>
</div>
</div><div class="rb-tab" data-value="5">
<div class="rb-spot">
<span class="rb-txt">5</span>
</div>
</div>
</div>

<p>5. On a scale of one to shrimp, how random are you?</p>
<div id="rb-5" class="rb">
<div class="rb-tab" data-value="4">
<div class="rb-spot">
<span class="rb-txt">4</span>
</div>
</div><div class="rb-tab" data-value="2">
<div class="rb-spot">
<span class="rb-txt">2</span>
</div>
</div><div class="rb-tab" data-value="5">
<div class="rb-spot">
<span class="rb-txt">5</span>
</div>
</div><div class="rb-tab" data-value="1">
<div class="rb-spot">
<span class="rb-txt">1</span>
</div>
</div><div class="rb-tab rb-tab-active" data-value="3">
<div class="rb-spot">
<span class="rb-txt">3</span>
</div>
</div>
</div>

<!-- Button -->
<div class="button-box">
<button class="button trigger">Submit!</button>
</div>

</div>``````
``````/* Containers */
html, body {
min-height: 100%;
}

body {
font-family: sans-serif;
background: #42426b;
color: rgba(255,255,255,.5);
}

.rb-box {
width: 80%;
max-width: 420px;
margin: 50px auto;
background: #292942;
0 2px 2px rgba(243,49,128,.5),
0 0px 5px rgba(243,49,128,.15),
0 0px 4px rgba(0,0,0,.35),
0 5px 20px rgba(243,49,128,.25),
0 15px 50px rgba(243,49,128,.75),
inset 0 0 15px rgba(255,255,255,.05);
}

p {
font-size: .9em;
}

.rb {
text-align: center;
background: rgba(255,255,255,.03);
}

.rb-tab {
display: inline-block;
position: relative;
width: 20%;
}

.rb-txt {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
font-size: .5em;
color: #FFFFFF;
}

.rb-spot {
position: absolute;
width: 18px;
height: 18px;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background: transparent;
border: 2px solid rgba(255,255,255,.3);
cursor: pointer;
transition: ease .5s;
}

.rb-tab-active .rb-spot {
background: rgba(0,0,0,.35);
border: 2px solid rgba(243,49,128,.6);
}

/* Submit Button */
.button-box {
text-align: center;
}

button {
display: inline-block;
width: 80%;
margin-top: 1.2em;
max-width: 220px;
font-size: .9em;
color: #D42D78;
text-transform: uppercase;
text-decoration: none;
letter-spacing: .15em;
background: white;
border: none;
outline: none;
box-shadow: 0 15px 20px -10px rgba(0, 0, 0, 0.3);
transition:
color 0.6s,
transform 0.3s;
cursor: pointer;
}

button:hover {
box-shadow: 0 3px 5px -5px rgba(0, 0, 0, 0.3);
color: #6f6f6f;
}``````
``````/*
===============================================================

Hi! Welcome to my little playground!

My name is Tobias Bogliolo. 'Open source' by default and always 'responsive',
I'm a publicist, visual designer and frontend developer based in Barcelona.

Here you will find some of my personal experiments. Sometimes usefull,
sometimes simply for fun. You are free to use them for whatever you want
but I would appreciate an attribution from my work. I hope you enjoy it.

===============================================================
*/
//Global:
var survey = []; //Bidimensional array: [ [1,3], [2,4] ]

//Switcher function:
\$(".rb-tab").click(function(){
//Spot switcher:
\$(this).parent().find(".rb-tab").removeClass("rb-tab-active");
});

//Save data:
\$(".trigger").click(function(){
//Empty array:
survey = [];
//Push data:
for (i=1; i<=\$(".rb").length; i++) {
var rb = "rb" + i;
var rbValue = parseInt(\$("#rb-"+i).find(".rb-tab-active").attr("data-value"));
//Bidimensional array push:
survey.push([i, rbValue]); //Bidimensional array: [ [1,3], [2,4] ]
};
//Debug:
debug();
});

//Debug:
function debug(){
var debug = "";
for (i=0; i<survey.length; i++) {
debug += "Nº " + survey[i][0] + " = " + survey[i][1] + "\n";
};