JQuery soColorPacker web page color picker and jquery color picker
Not using the uncommon jquery feature, compatible with all jquery1.2.6 and later versions
Instance Preview
Import File
- <Link type = "text/css" rel = "stylesheet" media = "all" href = "soColorPacker/css/style.css"/>
- <Script type = "text/javascript" src = "jquery1.8.0.min. js"> </script>
- <Script type = "text/javascript" src = "jquery. soColorPacker-1.0.min.js"> </script>
- <Script type = "text/javascript" src = "jquery. bgiframe-2.1.1.js"> </script>
Copy usage
- <Input type = "text" class = "txt" id = "txt_pack_1" name = "txt"/>
Copy
- $ ('# Txt_pack_1'). soColorPacker ();
Copy soColorPacke Parameters
- $ (Obj). soColorPacker ({
- ChangeTarget: null, // specifies the target object to be filled in or changed after the color is selected. The default value "null" indicates the currently referenced method object.
- TextChange: true, // whether to set the color value to the target object
- ColorChange: 1, // value: 0, 2, 0: do not change, 1: Change the text color, 2: change the background color
- SelfBgChange: false, // change the background color.
- Size: 2, // value: 1, 2, 3, change the color picker performance, 1: small, 2: medium, 3: Large
- X: 0, // the x axis offset of the color picker.
- Y: 20, // coordinate y axis offset of the color picker
- StyleClass: null, // custom name of the added class, cannot be the default "colorPackerBox"
- Callback: function () {}// click the color unit to return the event
- });
Copy Download