Ways to hide the value from being shown

I have integrated jscolor (from jscolor) to allow users to pick a color with an input field.

However, I am facing issues in styling it as I'm unable to remove the hex value of the selected color and couldn't find any relevant documentation on available options.

What I've attempted:

//Setting display to none doesn't show anything
display: none 
//Trying to adjust font-size to 0 causes alignment issues with the dot
font-size:0 
//This code does not seem to have any effect
class="jscolor "{valueElement:null, value:"#e6e5f4"}

Link to jsfiddle

Answer №1

Modify:

class="jscolor "{valueElement:null, value:"#e6e5f4"}

into:

class="jscolor {valueElement:null, value:'#e6e5f4'}"

Answer №2

Modify the jscolor class to the following:

<br><div id="cb">
        <ul class="list">
        <li class="list__item">
        <input id="CLR1" class="jscolor {valueElement:null, value:'#e6e5f4'}">
          <label class="label--checkbox">
            <input type="checkbox" class="checkbox" value="1">
                Must remain roughly aligned
          </label>
        </li>
        </ul>
    </div>

Answer №3

Unfortunately, your class did not apply due to a typo error.

Please select one of the following corrections:

<input id="CLR1" class="jscolor {valueElement:null, value:'#e6e5f4'}">
(recommended)

<input id="CLR1" class='jscolor {valueElement:null, value:"#e6e5f4"}'>

⋅ ⋅ ⋅

To ensure proper alignment, simply delete the top property from the .checkbox element:

.checkbox {
  position: relative;
  /* top: -0.375rem; */
  margin: 0 1rem 0 0;
  cursor: pointer;
}

Updated demo: https://jsfiddle.net/7ayLhLpc/

We hope this information is helpful!

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

"document.createElement encounters an issue when used for creating a new window

I am currently working with two different HTML files: FirstWindow and SecondWindow. The FirstWindow is linked to FirstWindowJS.js, while the SecondWindow is linked to SecondWindowJS.js. The issue arises when I try to open SecondWindow.html using FirstWind ...

Creating a series of image files from CSS and Javascript animations using Selenium in Python

Looking to convert custom CSS3/Javascript animations into PNG files on the server side and then combine them into a single video file? I found an interesting solution using PhantomJS here. As I am not very familiar with Selenium, adapting it for use with S ...

Using Express.js to serve simple SVG files (Technique involving Cheerio.js)

My goal is to manipulate SVGs before sending them through Express.js. The code snippet I am using is as follows: app.get("/iconic/styles/:style/:base/:icon", function (req, res) { var style = req.params.style; var base = req.params.base; var i ...

Choose the correct checkbox among several options

On my webpage, I am facing an issue with checkboxes. No matter which checkbox I click on, only the first one is getting checked. I can't figure out what the problem is. Initially, the checkboxes weren't showing as checked, but now only the first ...

Three Divisions Positioned at the Top, Middle, and Bottom

I need to place 3 divs at the top, middle, and bottom positions. To achieve this, I have used jQuery to calculate the viewport height and apply a percentage of it to the top and bottom divs. However, resizing the page causes issues as the middle div overl ...

Incorporate a variable into a string

My task here is to prepend a variable before each specific string in the given text. For example: var exampleString = "blabla:test abcde 123test:123"; var formattedString = "el.blabla:test abcde el.123test:123"; In this case, whenever there is a pattern ...

Utilizing Google Script to extract information from Gmail emails and transfer it to Google Sheets

I am facing a challenge with extracting data from an email and inputting it into a Google Sheet. While most of my code is functioning properly, I'm struggling with the regex section due to lack of expertise in this area. Below is a snippet of the HTM ...

Trigger a callback in KnockoutJS once all bindings have been successfully set up

I am facing a frustrating bug that is detailed here: <select> only shows first char of selected option and I am looking for a solution to remove the display:none from my select boxes in order to resolve this issue. Any ideas? Here's the binding ...

Shifting elements between positions using jquery or angular

Here's the issue I'm facing... I have an array of movie divs (image and description) displayed using ng-repeat. Now, when I select one of them, I want to implement the following (almost like a game of positioning): 1) I want to smoothly remove t ...

Can the underline height be adjusted when a developer uses `text-decoration: underline;` in CSS to generate an underline effect?

Can the height of the underline created using text-decoration: underline; in CSS be adjusted? I used CSS to apply an underline to the word "about" with an 'id' of '#title4' but I want to increase the space between the word and the unde ...

What methods can I use to accomplish the transformation of superimposed images?

Struggling with transforming a content box on my webpage. I have a div containing three overlapping images positioned using Grid, and I want to scale one of them to fill the entire div when scrolled over. While I managed to achieve this effect, I'm un ...

Clicking 'Submit' triggers a continuous loop upon loading

I set up this form to automatically submit once the page has finished loading. However, I seem to be encountering a problem where the page gets stuck in a continuous loop of reloading. HTML <body onload="document.getElementById('filters').su ...

What is the best way to eliminate the left margin entirely in CSS?

I am attempting to create an image view that fully covers the window, without any margins. I have tried various solutions such as setting the body margin and padding to 0, but they do not seem to work. body { margin: 0px; padding: 0px; } or *, html { ...

Some angles in three.js may cause faces to be obscured

When I work in Blender, my process usually involves creating straightforward models with colored materials. However, when I export these models to Collada format and import them into Three.js, I encounter an issue where some faces do not appear from cert ...

The Parcel build was unsuccessful due to an error from @parcel/resolver-default: The file '../../../../../css/main.css' could not be loaded within the './src' directory

I utilize [email protected]. Whenever I attempt to load an external css or javascript file in my index.html, Parcel consistently fails to build with the following error: Build failed. @parcel/core: Failed to resolve './css/main.css' from & ...

Selenium: A guide to specifying CSS for webpages with multiple elements sharing the same name

Looking for assistance with CSS selection: <table id="userPlaylistTable" cellspacing="0" cellpadding="0"> <div class="numCellWrapper"> ... When defining a css selector, how can I target a specific element among multiple elements of the same ...

Issues with Javascript positioning in Chrome and Safari are causing some functionality to malfunction

My Javascript script is designed to keep an image centered in the window even when the window is smaller than the image. It achieves this by adjusting the left offset of the image so that its center aligns with the center of the screen. If the window is la ...

Improving Performance in AngularJS Through Efficient Scope Passing Between Controllers

I am facing a situation in my AngularJS project where I have two controllers - controller 1 is constantly present in the view, while controller 2's visibility can change based on the view. In order to ensure that controller 1 has access to certain sco ...

What steps should be taken to complete orders following the checkout.session.completed event triggered by Stripe?

Having an issue with Stripe's metadata object that has a limit of 500 characters. My checkout flow is operational, but the only constraint is the character limit for my cart. I need to include extras and customer notes in my cartItems object for each ...

Accessing data from arrays asynchronously using JavaScript

Update I have included actual code below, in addition to the concept provided earlier. Here is the async array access structure I am trying to implement: for (p = 0; p < myList.length ; p++){ for (k = 0; k < RequestList.length; k++){ i ...