Skip to content

Commit e127850

Browse files
committed
innerWidth
1 parent a2fa8ac commit e127850

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

jQuery/css/innerWidth.html

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
4+
<head>
5+
<meta charset="utf-8">
6+
<title>innerWidth</title>
7+
<style>
8+
p {
9+
margin: 10px;
10+
padding: 10px;
11+
border: 1px solid rgb(4, 236, 205);
12+
}
13+
</style>
14+
<script src="https://code.jquery.com/jquery-3.4.1.js"></script>
15+
</head>
16+
17+
<body>
18+
19+
<p>Hi</p>
20+
<p></p>
21+
22+
<script>
23+
var p = $("p").first();
24+
$("p").last().text("innerWidth : " + p.innerWidth());
25+
</script>
26+
27+
</body>
28+
29+
</html>

0 commit comments

Comments
 (0)