- <head>
- <meta charset="utf-8">
- <title>Hide and show</title>
- <style>
-
- .text_container {
- text-align: left;
- width: 500px;
- color: #000;
- background-color: #ddd;
- border: solid 1px #777;
- margin: 0 auto 10px;
- padding: 10px;
- cursor: pointer
- }
- .text_container div p {
- cursor: default !important;
- margin-bottom: 10px
- }
- .visible>div {
- display: block;
- font-size: 17px;
- }
- form,
- .subscribe:hover>div,
- .hidden>div {
- display: none
- }
- </style>
- </head>
-
- <body>
-
- <div class="text_container">
- <h2>Doboz</h2>
- <div>
- <p><a href="http://www.weblabor.hu" target="_blank">Home</a> Leírás </p>
- </div>
- </div>
-
-
- <script type="text/javascript" src="http://code.jquery.com/jquery-1.7.min.js"></script>
- <script type="text/javascript">
- $(document).ready(function(){
- $('.text_container').addClass("hidden");
-
- $('.text_container').click(function() {
- var $this = $(this);
- if ($this.hasClass("hidden")) {
- $(this).removeClass("hidden").addClass("visible");
- } else {
- $(this).removeClass("visible").addClass("hidden");
- }
- });
- });
- </script>
- </body>
- </html>
<head>
<meta charset="utf-8">
<title>Hide and show</title>
<style>
.text_container {
text-align: left;
width: 500px;
color: #000;
background-color: #ddd;
border: solid 1px #777;
margin: 0 auto 10px;
padding: 10px;
cursor: pointer
}
.text_container div p {
cursor: default !important;
margin-bottom: 10px
}
.visible>div {
display: block;
font-size: 17px;
}
form,
.subscribe:hover>div,
.hidden>div {
display: none
}
</style>
</head>
<body>
<div class="text_container">
<h2>Doboz</h2>
<div>
<p><a href="http://www.weblabor.hu" target="_blank">Home</a> Leírás </p>
</div>
</div>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.7.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$('.text_container').addClass("hidden");
$('.text_container').click(function() {
var $this = $(this);
if ($this.hasClass("hidden")) {
$(this).removeClass("hidden").addClass("visible");
} else {
$(this).removeClass("visible").addClass("hidden");
}
});
});
</script>
</body>
</html>
Azt szeretném elérni, hogy ha a Doboz szövegre kattintok akkor nyissa ki és csukja be a box-ot! Remélem tud nekem valaki ebben segíteni! Mert jelenleg ha egy linket helyezek el benn akkor automatikusan becsukja! Köszi!
■