Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rkd-modal

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rkd-modal

Plain content and AJAX supported modal.

  • 1.2.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
decreased by-84.21%
Maintainers
1
Weekly downloads
 
Created
Source

npm License

RKD Modal

Plain content and AJAX supported modal.

Install

npm install rkd-modal

How to use?

See example HTML and JSFiddle.

AJAX modal

Create a link to modal

<a
  href="https://cors.io/?http://example.com/"
  class="rkd-modal-ajax"
  data-rkd-modal-selector="p"
>Open ajax modal</a>

That's it!

Options

data attributes:

  • data-rkd-modal-selector (optional): jQuery selector which content will be loaded from requested URL.

Content modal with current item contents

<a href="#" class="rkd-modal-this">This content will be displayed in modal</a>

Content modal

Create a link to modal

<a href="#" class="rkd-modal" data-rkd-modal-id="modal-content">Open simple content modal</a>

Add modal to source

<!-- Content modal -->
<div class="modal" id="modal-content">
  <input class="modal-state" type="checkbox" />
  <div class="modal-fade-screen">
    <div class="modal-inner">
      <div class="modal-close"></div>
      <h1>Modal Title</h1>
      <p class="modal-intro">Intro text</p>
      <p class="modal-content">Body text</p>
    </div>
  </div>
</div>
Options

data attributes:

  • data-rkd-modal-id (required): custom modal ID. Must be unique.

Customise

You can override any CSS (SCSS) you need to make it your own.

License

MIT

Keywords

FAQs

Package last updated on 28 Dec 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc