score:1
Accepted answer
You are only using one =
. This results in the c
variable having its value affected to 1
, it does not test its value.
You can either use 2 or 3 =
. See the difference here.
if (c === 1) { d3.select("bt1").attr('disabled', 'disabled'); }
Source: stackoverflow.com
Related Query
- If else statement that disables a button
- How to Give the link to button that contains to specific circle
- How to access the DOM element that correlates to a D3 SVG object?
- clicking a node in d3 from a button outside the svg
- How to create floor plans that work nice with mobile and desktop browsers?
- Insert padding so that points do not overlap with y or x-axis
- how to deal with OnChanges that requires an AfterViewInit
- Draw imbricated blocks that are rotated and fliped with d3.js
- Basic d3: why can you select things that don't exist yet?
- get value of checked radio button using d3.js
- Hitting browser "back" button shows JSON rather than HTML (using Rails & d3.js)
- Does Vega-Lite provide all the features that Vega provides?
- D3: hide voronoi strokes that fall 'in the sea'
- How to create a reusable component in D3 with an API that manipulates each instance of the component?
- How to force nvd3 to display the equal number of ticks as that of the values plotted on the graph-nvd3
- Use D3.min to find lowest value that is not 0
- dagre-d3 how to click node and run an event after that
- If a transition lasts n seconds is it possible to start it at a specified percentage of that time?
- How to update elements of an HTML that the elements are created using data from a CSV file?
- Is there a way to reduce lagging of a guideline that follows the mouse pointer?
- D3.js - how to add zoom button with the default wheelmouse zoom behavior
- Button to download inpage SVG code as an SVG file?
- How do I process data that is nested multiple levels in D3?
- Circle approximation that is a regular polygon with N corners
- how do i add a zoom in and zoom out button in a graph on d3
- d3js panning with middle mouse button
- D3 zoom on jquery button click
- Clickable datapoints that launches closeable modal window in d3 chart (nvd3)
- d3.js - stacked graphs that are both zoomed in and out/scrolled when using scrollwheel/drag on either graph
- When using D3.js, is there a method to automatically get the closest `key` that has data?
More Query from same tag
- Handling extraneous characters/wildcards in d3 time format
- Converting csv file data to a JavaScript dictionary
- Styling a Legend in D3
- Cal-Heatmap legend colors for qualitative categories
- d3js: time scaling and "1901"
- Crossfilter filters not filtering (dc.js)
- D3 styling of text element
- Draw a path from an origin point to the outside radius of a circle
- D3: Brushing already zoomed data
- Using d3 to draw a map?
- d3.js circle hover animation
- How to remove these D3.js console log error
- meteor piechart doesn't show up completely
- nvd3.js - unable to change color of symbol in scatter plot
- csv parsing into arrays in d3
- D3 fit nodes on screen
- Javascript not working when Alert is removed
- D3: Color a "Element" on a graph by the value of the key
- Querying MongoDB from browser using a flask backend
- Percentage Change in dc.js/crossfilter
- some trouble in d3 v4 when I want to draw a chord
- D3 Scatter Plot With Nested Array
- flowcharts in d3js using dagre-d3 or colajs
- How do I resize SVG images on a map as the zoom level changes?
- D3 Sorting Bar Chart Error n.each
- d3 zoom function issues in v4
- Text Inside SVG Circle in D3 Doesn't Show
- d3.js forced directed graph effects on enter
- how to read dynamic tsv file d3js
- d3.js v4 - Nested Selections