0.8.12 • Published 2 years ago

@pluginjs/loader v0.8.12

Weekly downloads
3
License
GPL-3.0
Repository
github
Last release
2 years ago

Loader

npm package

A flexible modern loader js plugin.

Samples

Introduction

Installation

Yarn

yarn add @pluginjs/loader

NPM

npm i @pluginjs/loader

Getting Started

CDN:

Development:

<script src="https://unpkg.com/@pluginjs/loader/dist/loader.js"></script>
<link rel="stylesheet" href="https://unpkg.com/@pluginjs/loader/dist/loader.css">

Production:

<script src="https://unpkg.com/@pluginjs/loader/dist/loader.min.js"></script>
<link rel="stylesheet" href="https://unpkg.com/@pluginjs/loader/dist/loader.min.css">

Initialize

HTML:

<div class="element"></div>

ECMAScript Module:

import Loader from "@pluginjs/loader"
import "@pluginjs/loader/dist/loader.css"

Loader.of(document.querySelector('.element'), options)

CommonJS:

require("@pluginjs/loader/dist/loader.css")
const Loader = require("@pluginjs/loader")

Loader.of(document.querySelector('.element'), options)

Browser:

<link rel="stylesheet" href="https://unpkg.com/@pluginjs/loader/dist/loader.css">
<script src="https://unpkg.com/@pluginjs/loader/dist/loader.js"></script>
<script>
  Pj.loader('.element', options)
</script>

API

Options

Options are called on loader instances through the loader options itself. You can also save the instances to variable for further use.

NameDescriptionDefault
"theme"Add plugin theme optionnull

Events

Events are called on loader instances through the loader events itself. You can also save the instances to variable for further use.

NameDescription
"ready"Gets fired when plugin is ready
"enable"Gets fired when plugin is enabled
"disable"Gets fired when plugin is disabled
"destroy"Gets fired when plugin is destroy
"show"Gets fired when plugin is show
"hide"Gets fired when plugin is hide

Methods

Methods are called on loader instances through the loader method itself. You can also save the instances to variable for further use.

NameDescription
"enable"Enabled plugin if plugin is disabled
"disable"Disable plugin
"destroy"Destroy plugin
"show"Show plugin if it is hiden
"hide"Hide plugin

Classes

Name | Description | Default --|| "NAMESPACE" | Declare plugin namespace | pj-loader "THEME" | Declare plugin theme | {namespace}s--{theme} "ACTIVE" | Announce plugin is actived | {namespace}-active "DISABLED" | Announce plugin is disabled | {namespace}-disabled "HIDDEN" | Announce plugin is hidden | {namespace}-hidden

Browser support

Tested on all major browsers.

IE / EdgeFirefoxChromeSafariOpera
IE11, Edgelast 2 versionslast 2 versionslast 2 versionslast 2 versions

License

@pluginjs/loader is Licensed under the GPL-v3 license.

If you want to use @pluginjs/loader project to develop commercial sites, themes, projects, and applications, the Commercial license is the appropriate license. With this option, your source code is kept proprietary.

For purchase an Commercial License, contact us purchase@thecreation.co.

Copyright

Copyright (C) 2022 Creation Studio Limited.

0.8.12

2 years ago

0.8.11

3 years ago

0.8.10

3 years ago

0.8.9

3 years ago

0.8.8

4 years ago

0.8.7

4 years ago

0.8.6

4 years ago

0.8.5

4 years ago

0.8.4

4 years ago

0.8.3

5 years ago

0.8.2

5 years ago

0.7.21

5 years ago

0.7.19

5 years ago

0.7.20

5 years ago

0.7.18

5 years ago

0.7.17

5 years ago

0.7.16

5 years ago

0.7.15

6 years ago

0.7.14

6 years ago

0.7.13

6 years ago

0.7.12

6 years ago

0.7.11

6 years ago

0.7.10

6 years ago

0.7.9

6 years ago

0.7.8

6 years ago

0.7.7

6 years ago

0.7.6

6 years ago

0.7.5

6 years ago

0.7.4

6 years ago

0.7.3

6 years ago

0.7.2

6 years ago

0.7.1

6 years ago

0.7.0

6 years ago

0.6.6

6 years ago

0.6.5

6 years ago

0.6.4

6 years ago

0.6.3

6 years ago

0.6.2

6 years ago

0.6.1

6 years ago