<![CDATA[ html { margin:0; padding:0; } body { padding:0; } #topheader { width: 100%; margin: 0px auto; padding: 5px 0px 5px 0; background: none repeat scroll 0% 0% #000; xheight: 60px; color: #FFF; z-index: 10000; } #maintext { background-color: #fff; opacity: .9; padding: 10px; } #topheader h3 { font-size: 40px; font-family: Arial, Helvetica, sans-serif; color: #FFF; text-decoration: none; margin: 0px; padding: 0px 42px; text-transform: uppercase; text-align: center; font-weight: 400; xline-height: 42px; } #topheader a:hover { text-decoration: none; color: #CFCFCF; } #topheader a { color: #FFF; text-decoration: none; } #footer_container { width: 100%; font-family: Arial, Helvetica, sans-serif; margin: 0px auto; padding: 20px 0px 20px 10px; color: #FFF; background: none repeat scroll 0% 0% #000; } #footer_container a { color: #FFF; padding: 0px 5px; text-decoration: none; } #footer_container a:hover { color: #CFCFCF; } #container { margin:0 auto; width: 1000px; } #content { font-family: Arial, Helvetica, sans-serif; color: #666; } #header { background-image: url('bg.jpg'); background-repeat: no-repeat; background-size: cover; height: 604px; padding: 63px 125px 0px 491px; font-family: Georgia; font-size:16px; } #header span { font-size: 25px; xfont-weight: bold; color: #F2693F; } #line { height:50px; background-color: #eee05b; overflow: hidden; } #line p { margin: 0; font-size:30px; line-height: 55px; font-family: Georgia; text-align: center; text-transform: uppercase; } #content h1 { margin: 10px 0; font-size:75px; line-height: 75px; text-align: center; text-transform: uppercase; color: #F2693F; } #content form, #results { margin:0 60px; } #content ul { list-style-type: none; padding:0; } #content ul li:first-child { border-top: 1px solid #666; } #content a { text-decoration: none; color: #999; } #content a:hover { text-decoration: underline; color: blue; } #content ul li { border-bottom: 1px solid #666; text-transform: uppercase; line-height: 75px; margin:0; text-indent:0; font-size: 20px; } .checkbox { width: 78px; height: 72px; padding: 0 10px 0 0; background: url(bucketlist-checkbox.png) no-repeat; display: block; clear: left; float: left; margin-top: 2px; margin-left: 25px; } #results h2 { margin: 10px 0; color: #F2693F; font-size:30px; line-height: 30px; text-align: left; text-transform: uppercase; } #results p { margin: 10px 0; font-size: 20px; line-height: 20px; text-align: left; } #results h3 { margin: 10px 0; font-size:24px; line-height: 24px; text-align: left; font-weight: normal; } #results p a { text-align: center; text-transform: uppercase; } #quiz input[type=submit], #results .share a { display:inline-block; font-size: 20px; width:300px; height:44px; text-transform: uppercase; color:#fff; overflow:hidden; padding:12px 20px; text-decoration: none; } #quiz input[type=submit] { height:50px; background: #F2693F; border:0; xfont-weight: bold; margin:20px 44px; } #results { padding:0 44px; } #results h3 { margin-top:30px; } #results .share a img { width:auto; height:32px; position: relative; top: 6px; } #results .facebook { background: #3B5998; } #results .twitter { background: #55ACEE; } /* CUSTOM FORM ELEMENTS Created by Ryan Fait www.ryanfait.com The only things you may need to change in this file are the following variables: checkboxHeight, radioHeight and selectWidth (lines 24, 25, 26) The numbers you set for checkboxHeight and radioHeight should be one quarter of the total height of the image want to use for checkboxes and radio buttons. Both images should contain the four stages of both inputs stacked on top of each other in this order: unchecked, unchecked-clicked, checked, checked-clicked. You may need to adjust your images a bit if there is a slight vertical movement during the different stages of the button activation. The value of selectWidth should be the width of your select list image. Visit http://ryanfait.com/ for more information. */ var checkboxHeight = "72"; var radioHeight = "72"; var selectWidth = "190"; /* No need to change anything after this */ document.write('input.styled { display: none; } select.styled { position: relative; width: ' + selectWidth + 'px; opacity: 0; filter: alpha(opacity=0); z-index: 5; } .disabled { opacity: 0.5; filter: alpha(opacity=50); }'); var Custom = { init: function() { var inputs = document.getElementsByTagName("input"), span = Array(), textnode, option, active; for(a = 0; a -1) { span[a] = document.createElement("span"); span[a].className = inputs[a].type; if(inputs[a].checked == true) { if(inputs[a].type == "checkbox") { position = "0 -" + (checkboxHeight*2) + "px"; span[a].style.backgroundPosition = position; } else { position = "0 -" + (radioHeight*2) + "px"; span[a].style.backgroundPosition = position; } } inputs[a].parentNode.insertBefore(span[a], inputs[a]); inputs[a].onchange = Custom.clear; if(!inputs[a].getAttribute("disabled")) { span[a].onmousedown = Custom.pushed; span[a].onmouseup = Custom.check; } else { span[a].className = span[a].className += " disabled"; } } } document.onmouseup = Custom.clear; }, pushed: function() { element = this.nextSibling; if(element.checked == true && element.type == "checkbox") { this.style.backgroundPosition = "0 -" + checkboxHeight*3 + "px"; } else if(element.checked != true && element.type == "checkbox") { this.style.backgroundPosition = "0 -" + checkboxHeight + "px"; } }, check: function() { element = this.nextSibling; if(element.checked == true && element.type == "checkbox") { this.style.backgroundPosition = "0 0"; element.checked = false; } else { if(element.type == "checkbox") { this.style.backgroundPosition = "0 -" + checkboxHeight*2 + "px"; } else { this.style.backgroundPosition = "0 -" + radioHeight*2 + "px"; group = this.nextSibling.name; inputs = document.getElementsByTagName("input"); for(a = 0; a < inputs.length; a++) { if(inputs[a].name == group && inputs[a] != this.nextSibling) { inputs[a].previousSibling.style.backgroundPosition = "0 0"; } } } element.checked = true; } }, clear: function() { inputs = document.getElementsByTagName("input"); for(var b = 0; b -1) { inputs[b].previousSibling.style.backgroundPosition = "0 -" + checkboxHeight*2 + "px"; } else if(inputs[b].type == "checkbox" && inputs[b].className.indexOf("styled") > -1) { inputs[b].previousSibling.style.backgroundPosition = "0 0"; } else if(inputs[b].type == "radio" && inputs[b].checked == true && inputs[b].className.indexOf("styled") > -1) { inputs[b].previousSibling.style.backgroundPosition = "0 -" + radioHeight*2 + "px"; } else if(inputs[b].type == "radio" && inputs[b].className.indexOf("styled") > -1) { inputs[b].previousSibling.style.backgroundPosition = "0 0"; } } } } window.onload = Custom.init;

Washingtonian

The Great Washington

Bucket List

Your score: / 50

Share your score:

window.fbAsyncInit = function() { FB.init({ appId : '341283662736445', xfbml : false, version : 'v2.2' }); }; (function(d, s, id){ var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) {return;} js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/en_US/sdk.js"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk')); function getTitle( score ){ switch( true ){ case (score >= 50): return 'You remember when this was a “sleepy Southern town” (it changed after you went to college, no matter when that was).'; case (score >= 35): return 'You (or your parents) lunched at Duke’s. You know everything “Remember the Titans” got wrong. You have a strong opinion on how to pronounce “Glover.”'; case (score >= 25): return 'You have earned the label “Washingtonian,” and your house is worth far more than you paid for it.'; case (score >= 15): return 'You’ve outlasted at least one administration, and you’re probably a great tour guide.'; case (score >= 5): return 'You’ve seen more than most tourists. But you still have much to do.'; default: return 'You’re new. That’s OK; everyone was new here once. Get out there and get exploring!'; } } function score(){ $('#quiz input[type=submit]').attr('value','Update Your Score'); var score = $('#quiz :checked').size(); $('#results .score').text( score ); $('#results .title').text( getTitle( score ) ); var url = encodeURIComponent( baseURL( document.URL ) ); var tweeturl = $('#results .twitter').attr( 'href' ); var text = encodeURIComponent( 'I got ' + score + '/50 on the Great Washington Bucket List. How Washingtonian Are You?' ); $('#results .twitter').attr( 'href', tweeturl + '&text=' + text + '&url=' + url ); $('#results').slideDown(); var scroll_to = $('#results').offset().top + $('#results').height(); $('html, body').animate({ scrollTop: scroll_to }, 2000); } function shareOnFacebook(){ var score = $('#quiz :checked').size(); FB.ui({ method: 'share_open_graph', action_type: 'washingtonian:share', action_properties: JSON.stringify({ quiz: baseURL( document.URL ) + '?score=' + score }) }, function(response){ if (response && !response.error_code) { console.log('Posting completed.'); } else { console.log('Error while posting.'); console.log(response.error_code); } }); } function baseURL( sourceURL ) { var parts = sourceURL.split('?'); if( parts.length >= 2 ){ return parts[0]; } else { return sourceURL; } }
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */ var disqus_shortname = 'washingtonian'; // required: replace example with your forum shortname /* * * DON'T EDIT BELOW THIS LINE * * */ (function() { var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true; dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js'; (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq); })(); Please enable JavaScript to view the comments powered by Disqus. comments powered by Disqus
]]>