You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@ghost has it correct, you cannot get the width and height of an element during page load, which your code was likely running during. You can either put your script in your body tag, or use an onload event handler.
I'm running Rails 4,
I have the following .js:
jQuery('#vmap').vectorMap({ map: 'usa_en'})
And in my view I have:
Both jquery.vmap.usa.js/jquery.vmap.js and jqvmap.css files are being included (in my assets folder), however, I get the following error when I run:
Error: Invalid value for attribute width="null" jquery.vmap.js?body=1:126
VectorCanvas.setSize jquery.vmap.js?body=1:126
VectorCanvas jquery.vmap.js?body=1:114
WorldMap jquery.vmap.js?body=1:392
$.fn.vectorMap jquery.vmap.js?body=1:70
(anonymous function) vmap.js?body=1:1
Error: Invalid value for attribute height="null" jquery.vmap.js?body=1:127
VectorCanvas.setSize jquery.vmap.js?body=1:127
VectorCanvas jquery.vmap.js?body=1:114
WorldMap jquery.vmap.js?body=1:392
$.fn.vectorMap jquery.vmap.js?body=1:70
(anonymous function) vmap.js?body=1:1
The text was updated successfully, but these errors were encountered: