-
-
Save deanrad/4876226084e15011ad50 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
<style> | |
#foot {padding-bottom:20px;} | |
.two_column #customer_service_links { | |
height: inherit; | |
} | |
.tooltip{ | |
display: inline; | |
position: relative; | |
} | |
.tooltip:hover:after{ | |
background: #333; | |
background: rgba(0,0,0,.8); | |
border-radius: 5px; | |
bottom: 26px; | |
color: #fff; | |
content: attr(title); | |
left: 5%; | |
padding: 5px 15px; | |
position: absolute; | |
z-index: 98; | |
} | |
.tooltip:hover:before{ | |
border: solid; | |
border-color: #333 transparent; | |
border-width: 6px 6px 0 6px; | |
bottom: 20px; | |
content: ""; | |
left: 50%; | |
position: absolute; | |
z-index: 99; | |
} | |
textarea:focus { | |
outline: none !important; | |
border:5px solid #0b91ff; | |
outline: 2px solid blue; | |
box-shadow: 0 0 5px #0b91ff; | |
} | |
</style> | |
<script> | |
var map = ['Very Dissatisfied', 'Dissatisfied', 'Neutral', 'Satisfied', 'Very Satisfied']; | |
function addTT(divs) { | |
var divRay = document.querySelectorAll(divs); | |
for (i=0; i < divRay.length; i++) { | |
divRay[i].className = 'tooltip'; | |
divRay[i].setAttribute('title', map[i]); | |
} | |
} | |
setTimeout(function () { | |
addTT('#rater_buttons div'); | |
addTT('#cdu_content div'); | |
addTT('#cdu_design div'); | |
addTT('#cdu_usability div'); | |
}, 1000); | |
window.__olab_custom = function(){ | |
setTimeout(function() { | |
$("#overall"). removeAttr('role'); | |
$("#foot_text a").attr("title", "Privacy Policy - opens new window"); | |
$("#submit_button").on("click", function () { | |
setTimeout(function () { | |
if ($(".section.error").length > 0) { | |
var txt = $(".section.error").find("legend").text(); | |
var overall = /^(.*?)\*/.exec(txt)[1]; | |
$("form_errors").html("There were problems with your comment card.<br>Please select an "+overall+" rating"); | |
} | |
}, 1000); | |
}); | |
$('body').keydown(function(e) { | |
var code = e.keyCode || e.which; | |
if (code == '9' && e.target.id == 'submit_button') { | |
window.scrollTo(0,0); | |
$("#overall").focus(); | |
} | |
}); | |
},0); | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment