npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

draggable-mcs

v1.1.1

Published

The jQuery plugin that makes a div into a draggable object

Downloads

2

Readme

Quick start

draggable-mcs requires jQuery v1.9.1+.

Several quick start options are available:

Download

Download the latest release.

Clone the Repository

Clone the repo: git clone [email protected]:masonconsultancy/draggable-mcs.git

Npmjs

Install with npm: npm install draggable-mcs

Libman Library Manager

Add this to the libman.json file to include draggable-mcs in your root folder

{
  "provider": "jsdelivr",
  "library": "[email protected]",
  "destination": "wwwroot/lib/draggable-mcs/",
  "files": [
    "dist/css/draggable-mcs.css",
    "dist/css/draggable-mcs.css.map",
    "dist/css/draggable-mcs.min.css",
    "dist/js/draggable-mcs.js",
    "dist/js/draggable-mcs.js.map",
    "dist/js/draggable-mcs.min.js",
    "dist/js/draggable-mcs.min.js.map"
  ]
}

You can replace the version number with latest, to get the latest version.

Usage

Via JavaScript

// To style only selected with the draggable class
$('.draggable').draggable();

or

// To style all divs. Only divs with the class 'draggable' will be styled
$('div').draggable();

If calling draggable via JavaScript, you will need to wrap your code in a .ready() block or place it at the bottom of the page (after the last instance of draggable).

$(function () {
	$('div.draggable').draggable();
});

Information

Bootstrap 4.6 Example

<div class="card text-center draggable">
    <div class="card-header draggable-header">Featured</div>
    <div class="card-body">
      <h5 class="card-title">Special title treatment</h5>
      <p class="card-text">With supporting text below as a natural lead-in to additional content.</p>
	  <a href="#" class="btn btn-primary">Go somewhere</a>
	</div>
  <div class="card-footer text-muted">2 days ago</div>
</div>

##Options

Dock top left of the target element

{
  .draggable({ position: { dock: '#jQuerytarget' } });
}

Dock top left of the target element and move down 50

{
  .draggable({ position: { dock: '#jQuerytarget', top: 50, left: 0 } });
}

Dock relative to viewport (x=150, y=50)

{
  .draggable({ position: { top: 50, left: 150 } });
}

Change header target identifier

{
  .draggable({ headerIdentifier: '#headerid' });
}

Bugs and feature requests

Anyone and everyone is welcome to contribute. Please take a moment to review the guidelines for contributing. Make sure you're using the latest version of draggable before submitting an issue.

Documentation

Draggable's documentation, included in this repo is still being completed.

Copyright and license

Copyright (C) 2023 Mason Consultancy Ltd

Licensed under the MIT license.