jquery plugin to convert number inputs into knobs that can be adjusted by dragging with mouse or fingers

Overview

jquery-knobby

is a jquery plugin to convert number input elements into turnable knobs that can be adjusted by cyclic dragging with mouse or fingers - multi-touch is now supported! (DEPRECATED: behaviour and code is a bit wonky, should probably not use fantasy html attributes but data- attributes)

Demo

Image of jquery.knobby.js result (dark theme) Image of jquery.knobby.js result (light theme)

You'll find the demo files in the demo/ directory of the repository.

Installation

Load the Javascript file by including the script after jQuery has been included:

<script src="jquery.knobby.js"></script>

Also import the stylesheet:.

<link rel="stylesheet" href="jquery.knobby.light.css">

The appearance of the plugin is fully customizable through CSS โ€“ you can add a background of your choice or generate a noise background for example. The stylesheets are intended as starting points rather than final states.

Usage

You need to have an input like the following

<input type="number" name="input_name" min="0" max="10" value="5" />

To convert all inputs with a type of number on a page to knobby-knobs use:

$("input[type=number]").knobby();

You can pass options to configure knobby - the numbers given are the default values:

$(".high-pass").knobby({
    min:0,
    max:100,
    turn:1,
    step:1,
    size:4,
    handleSize:1,
    handleGap:.25
});

Options

The following options can be served as attributes or passed as options - if both is present attribute wins.

attribute description type
min minimum knob value โ€“ must be smaller than the max-value float
max maximum knob value โ€“ must be larger than the min-value float
step the minimun change of the value; there should be an normal number of steps between min and max ((max-min)/step should result in an integer number) float
turn number of full circles from min to max float
size radius of the knob in em (relative to font-size) of .knobby-knob float
handleSize diameter of the handle in em float
handleGap gap between the outer border of the knob and the handle in em float
You might also like...

Simple material-style text inputs

Material-style inputs for Bootstrap 4 View Codepen: ralphvk/pen/LXpomR Add material-style inputs to your project. Include Bootstrap and jQuery First,

May 13, 2021

This is a dependency-free easy-to-use vanilla JavaScript addon allowing you to create HTML currency inputs with various different currencies and formattings.

intl-currency-input This is a dependency-free easy-to-use vanilla JavaScript addon allowing you to create HTML currency inputs with various different

Jan 4, 2023

Smooth scrolling effect (while using mouse wheel). No jQuery or other unnecessary stuff needed.

scrooth Smooth scrolling effect (while using mouse wheel). No jQuery or other unnecessary stuff needed. Why? I needed that, and I was unable to find p

Aug 29, 2022

๐Ÿ‘จ๐Ÿผโ€๐ŸŽจ It is a virtual blackboard, where you can make ๐Ÿ–Œ drawings through ๐Ÿ–ฑ the mouse. You have the option to choose ๐ŸŽจ colors and line thickness.

๐Ÿ‘จ๐Ÿผโ€๐ŸŽจ It is a virtual blackboard, where you can make ๐Ÿ–Œ drawings through ๐Ÿ–ฑ the mouse. You have the option to choose ๐ŸŽจ colors and line thickness.

๐Ÿ‘จ๐Ÿผโ€๐ŸŽจ Lets Draw ๐ŸŽจ รNDICE 1. Lets-Draw 2. Realization of the Project 3. Technologies used 4. Authors 1. Lets-Draw ๐Ÿ‘จ๐Ÿผโ€๐ŸŽจ It is a virtual blackboard

Mar 7, 2022

A command-line tool to convert Project Zomboid map data into Deep Zoom format

A command-line tool to convert Project Zomboid map data into Deep Zoom format

pzmap2dzi pzmap2dzi is a command-line tool running on Windows to convert Project Zomboid map data into Deep Zoom format. Features Supports both python

Dec 31, 2022

Convert some JavaScript/TypeScript code string into a .d.ts TypeScript Declaration code string

convert-to-dts Converts the source code for any .js or .ts file into the equivalent .d.ts code TypeScript would generate. Usage import { convertToDecl

Mar 3, 2022

When pasting screenshots into obsidian notes, convert the images to jpeg and compress them

When pasting screenshots into obsidian notes, convert the images to jpeg and compress them

obsidian-paste-png-to-jpeg This plugin is inspired by obsidian-paste-image-rename, obsidian-paste-image-rename can be used when inserting images renam

Nov 15, 2022

Convert any webpage into bionified text!

Convert any webpage into bionified text!

Bionify - Read Faster! LEGAL NOTICE: To the wonderful folks at Bionic Readingยฎ, this is not a pirated version of your Bionic Readingยฎ API, but rather

Dec 8, 2022
Owner
null
A Stacks DeFi app that automates covered call writing to generate sustainable, risk-adjusted yield.

?? Options Vault ?? A Stacks DeFi app that automates covered call writing to generate sustainable, risk-adjusted yield. Options vaults allow you to al

null 15 Nov 16, 2022
A jQuery-free general purpose library for building credit card forms, validating inputs and formatting numbers.

A jQuery-free general purpose library for building credit card forms, validating inputs and formatting numbers.

Jesse Pollak 528 Dec 30, 2022
Multiplies a number by zero. Useful for when you need to multiply a number by zero

multiply-by-zero Multiplies a number by zero. Useful for when you need to multiply a number by zero Please consider checking out the links of this pro

Dheirya Tyagi 2 Jul 3, 2022
A jQuery plugin that adds cross-browser mouse wheel support.

jQuery Mouse Wheel Plugin A jQuery plugin that adds cross-browser mouse wheel support with delta normalization. In order to use the plugin, simply bin

jQuery 3.9k Dec 26, 2022
An esbuild plugin to inject your application's version number or today's date into your files

esbuild-plugin-version-injector An esbuild plugin to inject your application's version number or today's date into your files This plugin was inspired

Favware 6 Dec 6, 2022
Generate a password based off user inputs with speed โšก

speedy-speedy-password Generate a password based off user inputs with speed โšก Install NPM npm i speedy-speedy-password Yarn yarn add speedy-speedy-pa

Brayden 5 Feb 2, 2022
The frontend of a full stack application of a personal wallet made with React, Node and MongoDB that allows you to add inputs, outputs and see all your extract.

The frontend of a full stack application of a personal wallet made with React, Node and MongoDB that allows you to add inputs, outputs and see all your extract.

Bernardo Rodrigues 5 Jun 2, 2022
The backend of a full stack application of a personal wallet made with React, Node and MongoDB that allows you to add inputs, outputs and see all your extract.

My first full stack application with the concept of a personal wallet that allows you to create a personal account to keep track of your entire statement by adding incoming and outgoing transactions, as well as calculating the total balance and being able to edit and delete old transactions.

Bernardo Rodrigues 6 Jun 23, 2022
A simple library to draw option menu or other popup inputs and layout on Node.js console.

console-gui-tools A simple library to draw option menu or other popup inputs and layout on Node.js console. console-gui-tools A simple Node.js library

Elia Lazzari 12 Dec 24, 2022