Thanks very much for this Brian - got my head round it now!
brian-263 wrote:
>
>
> On Thu, Dec 18, 2008 at 4:49 AM, alpha tester
> wrote:
>>
>>
>> Hmmm... struggling to read from this new dataset using the code provided
>> -
>> can someone point out the stupidity in the following code:
>>
On Thu, Dec 18, 2008 at 4:49 AM, alpha tester wrote:
>
>
> Hmmm... struggling to read from this new dataset using the code provided -
> can someone point out the stupidity in the following code:
>
>
>
>
> var myData =
> { records : [
> { CATEGORY : "Sport", TITLE : "The world of sport", LINK:
Hmmm... struggling to read from this new dataset using the code provided -
can someone point out the stupidity in the following code:
var myData =
{ records : [
{ CATEGORY : "Sport", TITLE : "The world of sport", LINK: "http://test.com";
},
{
Amazing! Love the way you can take what was about 90 lines of javascript and
turn it into about 5 of jquery and the jquery ends up being far more
flexible!
Thanks very much for your help!
(do you know of any tutorials that cover this sort of dataset management
stuff (push/group etc))
brian-26
On Wed, Dec 17, 2008 at 7:27 PM, Dave Methvin wrote:
>
> It might be worthwhile to generalize it and just push the original
> JSON record onto the list. That way the code doesn't need to change if
> you later need to pass more than title and link.
>
> var categories = {}, groupBy = "CATEGORY";
>
It might be worthwhile to generalize it and just push the original
JSON record onto the list. That way the code doesn't need to change if
you later need to pass more than title and link.
var categories = {}, groupBy = "CATEGORY";
$.each(myData.records, function(i, record)
{
if (!categories[rec
On Wed, Dec 17, 2008 at 9:49 AM, alpha tester wrote:
>
>
> Hi I'm just learning JQuery and while I've got my head around the general
> concepts, the real power of the logic it provides is still escaping me.
>
> I've got a page with a JSON dataset like this:
>
> var myData =
> { records : [
> { CA
7 matches
Mail list logo