[Proto-Scripty] TypeError: $(...) is null

2012-12-19 Thread tab1ta
Taking from an example that works: Show-Hide Divs http://ajax.googleapis.com/ajax/libs/prototype/1.7/prototype.js";> .toggle { padding: 0; margin-left: 1em; background-color: #989699; border: 2px solid #1f0c00; float: left; op

Re: [Proto-Scripty] TypeError: $(...) is null

2012-12-19 Thread Walter Lee Davis
You can fix this two different ways: either move your script block to the bottom of the page (just before /body, as in my example) or add an unobtrusive listener block around your main function. The issue here is that because your script appears before the HTML it applies to, none of the element