Project Avant Facebook Page Project Avant Twitter Page

tutorial #5: hijax links

Hijax Links uses Ajax to intercept the hyperlinks to external pages, and display them internal on the current webpage. At this time, we will use a section of this webpage to display information from external sources.

For this demonstration, you will learn how to create hijax links. You will learn how to build the jQuery code needed and learn the purpose of each line. Also, you learn about elements needed to make Hijax Links in HTML and CSS.

Below is demonstration of Hijax Links. Click on each of the links, and the information relating to the specific game console will be display in the section.

See Game Console Info Here

The How-To


<div id="hijax">

<ul id="gamesystem">

<li><a href="example/ps4.php">PlayStation 4</a></li>
<li><a href="example/xbox_one.php">Xbox One</a></li>
<li><a href="example/wiiu.php">Wii U>/a>>/li>


<div id="game-info">
<p>See Game Console Info Here</p>


HTML (PlayStation 4)

<h2>Sony PlayStation 4</h2>
<img src="img/ps4.png" alt="Sony PlayStation 4">
<p>The <b>PlayStation 4</b> was released in November 2013 by <b>
Sony Computer Entertainment (SCE)</b>, and has sold over ten
million units as of August 2014. Gamers can play their <b>PS4</b>
games on the <b>PlayStation Vita</b> through the <b>
Remote Play</b> feature.</p> <p>For more, visit the<a href=""
target="_blank" title="">
Official PlayStation website.</a></p>

HTML (Xbox One)

<h2>Microsoft Xbox One</h2>
<img src="img/xbox_one.png" alt="Microsoft Xbox One">
<p>Launched in November 2013, <b>Xbox One</b> is the latest game 
consolefrom <b>Microsoft</b>. Xbox One uses an improved
<b>Kinect</b>, a motion sensor add-on device that enables such features
like voice commands.</p><p>For more, visit the
<a href="" target="_blank"
title="">Official Xbox website</a></p>

HTML (Wii U)

<h2>Nintendo Wii U</h2>
<img src="lib/img/tutorial/tutorial_5/wii_u.png" alt="Nintendo Wii U">


#hijax ul {

#hijax ul li {

#hijax ul li a {


#hijax ul li a:hover {


#game-info {
	border:#155a7a thin solid;


//The functions will be executed, once the page is ready.
$('#gamesystem a').click(function(e) {
//Selects the hyperlink inside the element with the id of "gamesystem". 
var url = $(this).attr('href');
//Creates a varible that will be added to #gamesystem.  
$('#game-info').load(url);//This will Load the external content inside the element with the attribute named "game-info".  
e.preventDefault();//This will prevent reloading the external page.