1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Oksi-84 [34.3K]
4 years ago
3

Part 1: Modify code 1. In the.js file, write the JavaScript code for this application. Within the click event handlers for the e

lements in the sidebar, use the title attribute for each link to build the name of the JSON file that needs to be retrieved. Then, use that name to get the data for the speaker, enclose that data in HTML elements that are just like the ones that are used in the starting HTML for the first speaker, and put those elements in the main element in the HTML. That way, the CSS will work the same for the Ajax data as it did for the starting HTML. 2. Don’t forget to clear the elements from the main element before you put the new Ajax data in that element. 3. Verify there are no errors.

Computers and Technology
1 answer:
kykrilka [37]4 years ago
5 0

Answer:

Note: Provided Pham-Activity13.js file only. I did not modifying remaining JSON, HTML and CSS files. You have to put all your JSON, HTML and CSS files in the same folder/directory.

Screenshot of the Java script:  

Pham-Activity13.js: is attached

Explanation:

Code to copy:

Pham-Activity13.js:

$(document).ready(function () {

//on click for <a> element

$("#nav_list li").click(function() {

var title = $(this).children("a").attr("title");

      var filename = title+".json";

consumeJSON(filename);

});

}); // end ready

function consumeJSON(jsonFileURL) {

$.ajax({

url: jsonFileURL,

//handle as text

dataType: "text",

success: function (data) {

//data downloaded + pass data

var json = $.parseJSON(data);

// display results

$("main > h2").html(json.speakers[0].month + "<br/>" + json.speakers[0].speaker);

$("main > h1").html(json.speakers[0].title);

$("main > img").attr("src", json.speakers[0].image);

$("main > p").html(json.speakers[0].text);

}

});

}

You might be interested in
How exactly do I answer questions?
pshichka [43]

Answer:

If you mean this website, click the add answer button on the question

Explanation:

8 0
2 years ago
What are the components of computer system??<br>​
FinnZ [79.3K]

There are Mainly Five basic Components of a computer system.

Input Unit.

Output unit.

Memory Unit.

Control unit.

Arithmetic and Logic Unit.

8 0
3 years ago
Read 2 more answers
Which of the following keywords is used to remove a database table in Oracle? (Points : 2) DROP TABLE
juin [17]

Answer:

DROP TABLE

Explanation:

DROP TABLE is used to remove a database table in Oracle.

The syntax is DROP TABLE <TableName>;

For example: Suppose there is a table called Student in the database which needs to be removed. Then the administrator with the required privilege can issue with the following command:

DROP TABLE Student;

This is distinct from DELETE statement which is used to delete individual row or set of rows.

7 0
3 years ago
Create a java program using the following instructions:GymsRUs has a need to provide fitness/health information to their clients
poizon [28]

Answer:

See attached file for detailed code.

Explanation:

See attached file for explanation.

Download txt
8 0
4 years ago
To change the overall design of an entire document to include colors, fonts, and effects, a user should apply a _____.
Olenka [21]
User should apply a theme.

Hope this helps!
8 0
3 years ago
Read 2 more answers
Other questions:
  • Which of the following is a reliable source of information: a book recommended from my professor, britannica, a blog, or wikiped
    6·1 answer
  • What is a binary digit
    7·1 answer
  • Which type of address is used in a packet to address the packet to a single host??
    12·1 answer
  • Why is outfitting a workplace with video games in a technology development company consiered a strategic use of money
    14·1 answer
  • Rita wants to know the size of each image in a folder. Which view will help her find this information quickly?
    13·1 answer
  • after installing a secondary hard drive what needs to be done to the hard drive and what do these two task do?
    12·1 answer
  • Which object event is an indication that something has been created but not committed into the database?
    13·1 answer
  • Write a calculator program that will allow only addition, subtraction, multiplication &amp; division. Have the
    7·1 answer
  • Project: Design and Development Research Project
    14·1 answer
  • How are the four characteristics of the db approach related to the four functions of a dbms?
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!