Skip to content

Instantly share code, notes, and snippets.

@zhangsida
Created November 26, 2013 22:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zhangsida/7667299 to your computer and use it in GitHub Desktop.
Save zhangsida/7667299 to your computer and use it in GitHub Desktop.
switch between two <P>-element with jquery and css
<!DOCTYPE html>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js">
</script>
<script>
$(document).ready(function(){
$("button").click(function(){
$("p").toggle();
});
});
</script>
</head>
<body>
<button>Toggle</button>
<p style="display:none">This is a paragraph with little content.</p>
<p>This is another small paragraph.</p>
</body>
</html>
@zhangsida
Copy link
Author

Zeile 17: style="display:none" the point of this snippet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment