146
rated 0 times
[
147]
[
1]
/ answers: 1 / hits: 131579
/ 10 Years ago, sun, april 20, 2014, 12:00:00
I have a basic html page with some JS and CSS:
$('.expand').click(function() {
$('.img_display_content').show();
});
@charset utf-8;
/* CSS Document */
.wrap {
margin-left: auto;
margin-right: auto;
width: 40%;
}
.img_display_header {
height: 20px;
background-color: #CCC;
display: block;
border: #333 solid 1px;
margin-bottom: 2px;
}
.expand {
float: right;
height: 100%;
padding-right: 5px;
cursor: pointer;
}
.img_display_content {
width: 100%;
height: 100px;
background-color: #0F3;
margin-top: -2px;
display: none;
}
<html>
<head>
<link href=beta.css rel=stylesheet type=text/css />
<script src=http://code.jquery.com/jquery-2.1.0.min.js></script>
</head>
<body>
<div class=wrap>
<div class=img_display_header>
<div class=expand>+</div>
</div>
<div class=img_display_content></div>
</div>
</div>
</body>
</html>
A click on the div
with the class expand
does nothing...
I also have tried to copy/paste an example code from jQuery website but it also didn't work.
Can anyone help me with this problem?
More From » jquery