0.0.5 • Published 1 year ago

jquery.bay-window v0.0.5

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

jquery.bay-window.js

A jquery plugin that adds the floating window function.

Use requestAnimationFrame and transform

Example

example html

alt example

Installation

Include script after the jQuery library (unless you are packaging scripts somehow else):

<script src="/path/to/jquery.bay-window.min.js"></script>

Usage

If you want to use the default element(Built-in close button):

// If the bayWindowOption is used, the run method will be executed by default
$.createBayWindowElement(createBayWindowElementOption).bayWindow(
  bayWindowOption | methodName
)

or use a custom element:

$(element).bayWindow(bayWindowOption | methodName)

// if need destroy
$(closeBtn).on('click', function () {
  $(element).bayWindow('destroy')
})

use methods:

$(element).bayWindow(methodName)

Options for $.createBayWindowElement

Options for $(element).bayWindow(options)

Methods for $(element).bayWindow(methodName)