I can't seem to hide my paragraph the way i wanted it to be. I checked my code a lot of times and it seems correct. I don't know why it's not running.
<!DOCTYPE html>
<html lang="en">
<html>
<head>
<script type="text/javascript" src="jquery/jquery.js"></script>
<script type="text/javascript" src="jquery/toggle.js"></script>
</head>
<body>
<input type="button" value="hide" id="toggle">
<p id="paragraph">I want to hide!</p>
</body>
</html>
another page which has the toggle code
$(document).ready(function()){
$('#toggle').click(function(){
var value = $('#toggle').attr('value');
$('#paragraph').toggle('fast');
if (value == 'hide'){
$('#toggle').attr('value', 'show');
}
else if (value == 'show')
{
$('#toggle').attr('value', 'hide');
}
}
};