Skip to content

Wrapper: @tsparticles/jquery ​

Official jQuery plugin wrapper for tsParticles.

Install ​

bash
pnpm add @tsparticles/jquery @tsparticles/engine @tsparticles/slim

Quick setup flow ​

  1. Install package and load it in your jQuery setup.
  2. Initialize features once using slim/all as needed.
  3. Apply plugin on target element with options.

插件会直接挂载到每个选中的 DOM 元素上,因此元素不需要设置 id:

js
const container = await $(".particles-background").particles().load(options);

也可以对同一组元素使用 .ajax(url),从 JSON URL 加载选项。

Monorepo references ​

Readme ​