> For the complete documentation index, see [llms.txt](https://docs.shopone.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.shopone.io/cac-cong-cu-thiet-lap-co-ban-voi-landing-page/thanh-thiet-lap-nhanh/trinh-chinh-sua-nang-cao/su-kien.md).

# Sự kiện

**Sự kiện** cho phép bạn thêm các sự kiện tương tác vào các thành phần trên trang như nút bấm, hình ảnh, các khối văn bản… Những sự kiện này có thể làm cho trang của bạn trở nên sống động và hấp dẫn hơn, đồng thời cải thiện trải nghiệm người dùng.

<figure><img src="/files/MMJ3gSMP0hKeHvuz0lvn" alt=""><figcaption></figcaption></figure>

#### 1. Chọn sự kiện:

* **Nhấp chuột:** sự kiện xảy ra khi người dùng nhấp chuột vào phần tử.
* **Di chuột:** sự kiện xảy ra khi người dùng di chuyển con trỏ chuột qua phần tử.

<figure><img src="/files/YBhAj4jbLHewXvnFwSnW" alt=""><figcaption></figcaption></figure>

#### 2. Thiết lập hành động khi xảy ra sự kiện

<figure><img src="/files/6DVqqvWJrAZEGulVXVY9" alt=""><figcaption></figcaption></figure>

* **Thay đổi màu sắc:** thay đổi màu sắc của phần tử khi thực hiện sự kiện.
  * **Mục tiêu:** lựa chọn thay đổi màu sắc của màu chữ, màu nền, màu viền.
* **Mở popup**: hiển thị một cửa sổ popup với thông tin hoặc biểu mẫu.
  * **Mục tiêu:** lựa chọn popup và hiệu ứng popup xuất hiện.
* **Đóng popup**: đóng một cửa sổ popup hiện đang mở.
  * **Mục tiêu:** lựa chọn popup và hiệu ứng popup đóng lại.
* **Cuộn:** tự động cuộn trang đến một phần tử cụ thể.
  * **Mục tiêu:** lựa chọn section sẽ cuộn tới.
* **Mở liên kết**: mở một liên kết cụ thể khi người dùng tương tác với phần tử
  * **Mục tiêu:** lựa chọn liên kết mục tiêu và lựa chọn cách hiển thị: trong trang hoặc cửa sổ mới.
* **Ẩn/Hiện phần tử:** ẩn/ hiện phần tử được chỉ định.
  * **Mục tiêu:** nhập ID phần tử được ẩn đi hoặc hiện lên khi thực hiện sự kiện.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.shopone.io/cac-cong-cu-thiet-lap-co-ban-voi-landing-page/thanh-thiet-lap-nhanh/trinh-chinh-sua-nang-cao/su-kien.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
