![]() |
[jQuery] syntax question
Hi
Im fairly new to js and find I need to use the jQuery library. I am struggling to understand this code: Code:
<script id="source" language="javascript" type="text/javascript">Secondly, is there a way that I can use a function to populate the 'data' array, like so: Code:
var datasets = {Ed |
the code is simply constructing a javascript object...all objects in javascript are associative arrays so you can simply add a key-value pair anytime....the notation you see there is called JSON (javascript object notation) which is sorta short form to create objects.
and, yes you can use a function to set the value of an attribute in javascript |
| All times are GMT +1. The time now is 09:03 PM. |
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.