Web_ICP4 - Ggr9d/Web-and-Mobile-Programming GitHub Wiki

In Class Programming4:

The main objective of this ICP is to understand the object oriented JavaScript using jQuery and use of Github API with jQuery.

Task_1

Hover image

HTML code:

As a part of this task, when a mouse is hovered on an image, it has to appear on the required box along with the relevant text. The required JavaScript is as follows:

When the mouse is hovered, the update functionality generally tends the image to appear in the box required as below. The undo function restores the original image.

Code results the following output:

The original output when mouse isn't hovered.

When the mouse is hovered over an image it changes as follows:

Task_2

Github user finder

As a part of this task, when the user enters a Github username, it results in the login name,login ID, node ID, GitHub url, total count of repositories using the Github API.

The required code is as follows:

Here the function makes an XMLHTTP request and gets the data from an API.

The function fetches the data when a username is found. And if not it pops up an alert message.

Below code when the user is not found.

Output: