I am currently working on a little script that checks for the name and then retrieves the appropriate data from either XML or JSON.
Below is how far I have gotten thus far… the script works to retrieve some records, problem is its only able to get the first record because there is no check yet which one it wants.
This where it executes the actions when clicking on any of the dd/dt list options:
$(".List dd").live("click",function(){
var Name = $(this).attr('class');
changeHeader(Name);
changeDesc(Name);
});
And once clicked it retrieves the data, but im not sure what the right syntax is to use the “+a+” in the example below.
In the first example Name = $(this).attr(‘class’);
and are both changeHeader(Name); and changeDesc(Name); appointed then in the second example the “a” stands for the “Name” which works in all my examples just dont know the right syntax to put it in,
('<h1> ’ + “+a+”.desc.title + ‘</h1>’);
Does not work because the syntax is invalid.
Thanks! thats pretty close to what im trying to achieve:)
, except it now just appends the data behind “d” which is a class name, while im trying to get the class name and then find the records description and title.
so d.description and d.title dont work in its current state.