Im browsing the flot examples here http://people.iola.dk/olau/flot/examples/turning-series.html
(view source once there)
I came across this :
<script id="source" language="javascript" type="text/javascript">
$(function () {
var datasets = {
"usa": {...
The $(function() part. I get that its an anonymous function, I dont get why it is used here. Wouldnt this be just as good :
<script id="source" language="javascript" type="text/javascript">
var datasets = {
"usa": {...
I checked over at the jQuery docs (http://api.jquery.com/) and found no special use for function()