You are here

snippet - React: Warning: Failed context type: The context `router` is marked as required in `Link`, but its value is `undefined`
25 Jul, 2017
Testing React components with Jest I got an error: "Warning: Failed context type: The context `router` is marked as required in `Link`, but its value is `undefined`.". I am using Link from react-...
snippet - React: Wait for full render in snapshot testing
5 May, 2017
If you use full render not shallow in your tests, your tests might be rendered before the actual component and its subcomponents are fully loaded. In that case you need to delay the output, while...
snippet - Highcharts: full width lines
19 Apr, 2017
Highcharts has paddings and spacings that will make the area charts line appear inside of the chart element. To get full width line you need to disable some spacings and lines. You have to disable...
snippet - Highcharts: Hide highcharts.com link from footer
23 Mar, 2017
Highcharts comes with a credits link by default. This snippet shows how to hide the link using the configurations.
snippet - Highcharts: display no data message on top of the grid
22 Mar, 2017
No data is actually a module that needs to be loaded separately from the highcharts library. For some reason highcharts no data message is displayed below the grid. There is an easy fix of enabling...
snippet - Highcharts: Create a vertical line on highlighted value
21 Mar, 2017
You can create a vertical line on highlighted value in Highcharts. This might give a better visual when you have multiple lines. You could also use "shared: true" option in your tooltip to display...
snippet - jQuery: Using selectionStart, selectionEnd, setSelectionRange
21 Jun, 2016
Using selectionStart, selectionEnd, setSelectionRange in jQuery example. You can't use DOM commands on jQuery objects directly, you have to get the first value of the object.
snippet - jQuery: Input - focus and select all
18 Apr, 2016
How to focus and select all using javascript. This snippet shows it in an example of "jQuery: Toggle input text using checkbox". For an example you can extend this to any event or action where you...
snippet - jQuery: Toggle input text using checkbox
18 Apr, 2016
Snippet shows how to toggle input text using checkbox. Sometimes you need to show text field only when a checkbox is checked, that can be called conditional text field. So you need a checkbox and a...
snippet - jQuery: Run something after $.each has completed
12 Apr, 2016
JavaScript runs asynchronously, that means when you initialize $.each every bit of code that comes after that will not be executed when $.each has finished. Sometimes you need your code to be...