diff --git a/dist/jquery.input.js b/dist/jquery.input.js index 5aa9411..0e1571c 100644 --- a/dist/jquery.input.js +++ b/dist/jquery.input.js @@ -1145,6 +1145,7 @@ addInputsBasic('hidden', 'input[type="hidden"]'); addInputsGroup('radio', 'input[type="radio"]'); addInputsGroup('checkbox', 'input[type="checkbox"]'); // eslint-disable-next-line max-len + addInputsGroup('color', 'input[type="color"]'); addInputsBasic(undefined, 'input[type]:not([type="file"],[type="hidden"],[type="radio"],[type="checkbox"])'); } diff --git a/index.html b/index.html index f0ee36d..e834234 100644 --- a/index.html +++ b/index.html @@ -5,6 +5,12 @@ jQuery.input +

Color inputs

+
+ color1 + color2 +
+

Input Elements

@@ -185,8 +191,8 @@

Input Element Setters

b
- - + + $(document).ready(function () { 'use strict'; diff --git a/package.json b/package.json index b3dc266..fca1c3b 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "@tdcore/jquery.input", "version": "0.1.0", "description": "A Common interface for html input elements.", - "main": "dist/jquery.input.js", + "main": "src/index.js", "scripts": { "build": "npx rollup -c", "test": "grunt" diff --git a/src/buildFormInputs.js b/src/buildFormInputs.js index 7912aa9..5452ded 100755 --- a/src/buildFormInputs.js +++ b/src/buildFormInputs.js @@ -86,7 +86,7 @@ export default function buildFormInputs(fig) { addInputsBasic('textarea', $self); } else if ( ($self.is('input[type="text"]') - || $self.is('input')) && !$self.attr('type') + || $self.is('input')) && !$self.attr('type') ) { addInputsBasic('text', $self); } else if ($self.is('input[type="password"]')) { @@ -139,6 +139,7 @@ export default function buildFormInputs(fig) { addInputsBasic('hidden', 'input[type="hidden"]'); addInputsGroup('radio', 'input[type="radio"]'); addInputsGroup('checkbox', 'input[type="checkbox"]'); + addInputsGroup('color', 'input[type="color"]'); // eslint-disable-next-line max-len addInputsBasic(undefined, 'input[type]:not([type="file"],[type="hidden"],[type="radio"],[type="checkbox"])'); } diff --git a/src/main.js b/src/index.js similarity index 100% rename from src/main.js rename to src/index.js