But if I copy paste code codeacademy recognizes it as html used for formatting the message. So you mean i don’t have to use
(document).ready(sign_in);
?
No, i understand the document.ready, i do not understand why you call your sign_in function on document ready. Did you include jquery library in your code? Could i see your full code?
@stetim94 What’s wrong with calling sign_in() on page load? If sign_in() doesn’t get called, it won’t run I don’t think.
@printcoder_eric I see two problems, you’ve got an extra curly brace before the last line, and (assuming you’re using jQuery) you need a dollar sign ($) in front of (document).
How is .sign-in-dropdown being hidden? Like Stetim94 says, it’d be really helpful if you could post your code. If you format it, the forums will show it properly
The correct answer is three ``` (backticks) located above your tab key. Place them at the beginning and end of your code. Thanks to stetim94 for that one when I was in the introductory phase of the forums.
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="home.css"></link>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"></link>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<script src="home.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
</head>
<body>
<!-- nav with a bootstrap row in it -->
<div class="nav">
<div class="row">
<nav class="navbar navbar-default">
<div class='logo'>
<img src="SciSols%20Logo.png">
</div>
<!-- Home, About Us, Debates, Fun links -->
<div class="nav nav-tabs">
<a href="file:///Users/eric/Desktop/SciSols/scisols.org/home/home.html">Home</a>
<a href="file:///Users/eric/Desktop/SciSols/scisols.org/about/about.html">About Us</a>
<a href="file:///Users/eric/Desktop/SciSols/scisols.org/debates/debates.php">Debates</a>
<a href="file:///Users/eric/Desktop/SciSols/scisols.org/fun/fun.php">Fun</a>\
<a href="">Join</a>
<!-- end of navigation -->
<!-- sign in dropdown menu -->
<div class="sign-in-dropdown">
<form>
<input type="text" name="username" placeholder="Username">
<input type="text" name="password" placeholder="Password">
<input type="submit" value="Submit">
</form>
</div>
<!-- end -->
</div>
</nav>
</div>
</div>
<!-- sign in -->
<div class="sign-in-button">
<a class="sign-in-button" href="file:///Users/eric/Desktop/SciSols/scisols.org/sign_in/signin.html">Sign In</a>
</div>
<!-- end of sign in -->
<div class="jumbotron">
<div class='row'>
<h3>SciSols</h3>
<div class="col-md-6">
<p> We like to do everything here from helping the homeless to designing robots that might one day go to space. We are also working with a <a href="http://">small company</a> that makes origami and other little trinkets to bring that extra bit of joy to the world that alot of people are in need of.</p>
</div>
</div>
</div>
</body>
</html>
And here is the Javascript again:
var sign_in =function(){
$('.sign-in-button').click(function(){
$('.sign-in-dropdown').toggle();
});
}
}
(document).ready(sign_in);
They more than likely will. This is probably out of my league. I just wanted to help you format your code. But that does not mean I won’t make an honest attempt. I also see that systvan already supplied the link for the formatting be on the look out for those in the future.
Google js validators and see if plugging this code into one of them is helpful. The validators can be cryptic at times but I had to use them for my class and if you find an official validator it may just help you track down your error. I use the official validators for html and css. When I am not tinkering.
You can edit your existing post by selecting the pen icon. Edits will not send an alert to the respondent though to my knowledge. I recommend you save those links in your favorites they are invaluable for troubleshooting.