Skip to content
This repository was archived by the owner on Mar 31, 2025. It is now read-only.

Commit 58a4c6a

Browse files
committed
Update example
1 parent 2a46d4a commit 58a4c6a

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

example/index.html

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,10 @@
22
<html>
33
<head>
44
<meta charset="utf-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1">
56

67
<title>CashCash: Example</title>
78

8-
<meta name="viewport" content="width=device-width, initial-scale=1">
9-
109
<style>
1110
body {
1211
color: #333;
@@ -31,17 +30,17 @@ <h1>CashCash: Example</h1>
3130
</main>
3231

3332
<script type="module">
34-
import CashCash from '../dist/cashcash.mjs';
33+
import { default as $ } from "../dist/cashcash.mjs";
3534

36-
const $main = CashCash('main');
37-
const $h1 = CashCash('h1', $main[0]);
38-
const $p = CashCash('p');
35+
const main = $("main");
36+
const h1 = $("h1", main[0]);
37+
const p = $("p");
3938

40-
console.log('Main content:', $main);
41-
console.log('Primary heading:', $h1);
42-
console.log('Paragraphs:', $p);
39+
console.log("Main content:", main);
40+
console.log("Primary heading:", h1);
41+
console.log("Paragraphs:", p);
4342

44-
$p.forEach(node => console.log(node.getAttribute('id')));
43+
p.forEach(node => console.log(node.getAttribute("id")));
4544
</script>
4645

4746
</body>

0 commit comments

Comments
 (0)