demo.js:16 Uncaught TypeError: Cannot read property 'style' of null(…)

351
November 25, 2016, at 10:12 PM

Im trying to use a lib from codepen but its causing me some errors, its telling me there are some uncaught errors demo.js:16 Uncaught TypeError: Cannot read property 'style' of null(…). It is referencing to:

initHeader  @   demo.js:16
(anonymous function)    @   demo.js:6
(anonymous function)    @   demo.js:185

Which relate to:

:16         largeHeader.style.height = height+'px';
:6          initHeader();
185:        })();

Is it because the script is an anonymous function or does it need to be ready when the document is loaded? I have tried correcting it but don;t seem to be getting anywhere...

The full code can be seen here: https://s3-us-west-2.amazonaws.com/s.cdpn.io/499416/demo.js

READ ALSO
How do I display this json file correctly in ng-repeat?

How do I display this json file correctly in ng-repeat?

I'm trying to create a Store page for my websiteI want to display the following json file in ng-repeat:

302
Javascript date backward

Javascript date backward

I'm trying to compute the date of the day before using:

355
Can't remove Google Map Markers when reloading data

Can't remove Google Map Markers when reloading data

I'm a having some trouble with google maps V3 API

305
Redux form validation

Redux form validation

I have a form and I see that the error is true but is not showingI have build it like this:

513