BAB 2 – INSTALASI DAN PERSIAPAN

2.1 Membuat Folder Project

Buat struktur berikut:

belajar-jquery/

├── index.html
├── css
│ └── style.css
└── js
└── script.js

2.2 Menggunakan CDN

Masukkan kode berikut sebelum tag </body>.

<script src="https://code.jquery.com/jquery-3.7.1.min.js"></script>

2.3 Membuat File Pertama

index.html

<!DOCTYPE html>
<html>
<head>
<title>Belajar jQuery</title>
</head>
<body>

<h1>Halo jQuery</h1>

<script src="https://code.jquery.com/jquery-3.7.1.min.js"></script>

</body>
</html>

Simpan lalu jalankan pada browser.


PRAKTIK BAB 2

Buat halaman dengan:

  • Judul
  • Paragraf
  • Tombol

Pastikan jQuery sudah terhubung dengan benar.

Similar Posts

Tinggalkan Balasan

Alamat email Anda tidak akan dipublikasikan. Ruas yang wajib ditandai *