Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="utf-8" />
- <title>TakeQuiz - My ASP.NET MVC Application</title>
- <link href="/favicon.ico" rel="shortcut icon" type="image/x-icon" />
- <meta name="viewport" content="width=device-width" />
- <link href="style.css" rel="stylesheet" type="text/css" />
- <style type="text/css">
- #category1 { display: none; }#category2 { display: none; }
- #allcorrect
- {
- display: none;
- }
- </style>
- <link href="/Content/site.css" rel="stylesheet"/>
- <script src="/Scripts/modernizr-2.5.3.js"></script>
- </head>
- <body>
- <header>
- <div class="content-wrapper">
- <div class="float-left">
- <p class="site-title"><a href="/">your logo here</a></p>
- </div>
- <div class="float-right">
- <section id="login">
- <ul>
- <li><a href="/Account/Register" id="registerLink">Register</a></li>
- <li><a href="/Account/Login" id="loginLink">Log in</a></li>
- </ul>
- </section>
- <nav>
- <ul id="menu">
- <li><a href="/">Home</a></li>
- <li><a href="/Home/About">About</a></li>
- <li><a href="/Home/Contact">Contact</a></li>
- </ul>
- </nav>
- </div>
- </div>
- </header>
- <div id="body">
- <section class="content-wrapper main-content clear-fix">
- <script src="jquery.js"></script>
- <script type="">
- $(document).ready(function () {
- $("#results").click(function () {
- if (
- !$("input[@name=q1]:checked").val()||!$("input[@name=q2]:checked").val()
- )
- {
- alert("You're not done yet!");
- }
- else{
- var cat1name = "1";
- var cat2name = "2";
- var cat1 = ($("input[@name=q1]:checked").val() != "a");
- var cat2 = ($("input[@name=q2]:checked").val() != "b");
- var cat11 = (!cat1 && !cat2);
- var categories = [];
- if (cat1) { categories.push(cat1name) };
- if (cat2) { categories.push(cat2name) };
- $("#category1").hide()
- $("#category2").hide()
- if (cat1) { $("#category1").show("slow"); };
- if (cat2) { $("#category2").show("slow"); };
- }
- });
- });
- </script>
- <h2>Take Quiz: first private quiz</h2>
- <p class="question">1. how many woodchucks chuck??</p>
- <ul class="answers">
- <input type="radio" name="q1" value="a" id="q1a" ><label for="q1a">1000</label><br/>
- <input type="radio" name="q1" value="b" id="q1b" ><label for="q1b">many</label><br/>
- </ul>
- <p class="question">2. why is this private??</p>
- <ul class="answers">
- <input type="radio" name="q2" value="a" id="q2a" ><label for="q2a">because it contains top secret stuff</label><br/>
- <input type="radio" name="q2" value="b" id="q2b" ><label for="q2b">because its silly</label><br/>
- </ul>
- <br/>
- <div id="results">
- Show me the answers!
- </div>
- <div id="category1">
- <p>
- <strong>Question 1:</strong> The correct answer is <strong>1000</strong>
- </p>
- </div>
- <div id="category2">
- <p>
- <strong>Question 2:</strong> The correct answer is <strong>because it contains top secret stuff</strong>
- </p>
- </div>
- <div id="allcorrect">
- <p>
- You answered them all right!</p>
- </div>
- </section>
- </div>
- <footer>
- <div class="content-wrapper">
- <div class="float-left">
- <p>© 2014 - My ASP.NET MVC Application</p>
- </div>
- </div>
- </footer>
- <script src="/Scripts/jquery-1.7.1.js"></script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement