Show sourcecode

The following files exists in this folder. Click to view.

Getting_to_know_jQuery/

1.php
2.php
3.php
4.php
5.php
6.php
7.php
README
README~
about.php
common.php
favicon.ico
index.php
jquery-1.4.1.min.js
nav.css
page.php
source.php
stylesheet.css
template.php
tutorial.php

7.php
<?php
// ===========================================================================================
//
// 1.php
//
// Description: Home page for the site.
//
//
// Author: Mikael Roos
//


// -------------------------------------------------------------------------------------------
//
// Error handling on/off
//
error_reporting(E_ALL | E_STRICT);
$debug = "";
$debugEnable = FALSE;  // TRUE to enable debugging, FALSE to not print out debug information


// -------------------------------------------------------------------------------------------
//
// Take care of GET variables
//
//$getId = (empty($_GET['id']) ? "" : $_GET['id']);


// -------------------------------------------------------------------------------------------
//
// The content of the page
//
$html = <<<EOD
<!doctype html>
<html lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"></script>

    <script type="text/javascript">    
        $(document).ready(function(){
            $("a").click(function(event){
                event.preventDefault();
                $.get(event.target.href, function(data){
                    $(".result").html(data.replace(/</g, "&lt;").replace(/>/g, "&gt;"));
                });
            });
               
        });
    </script> 

     <style type="text/css">
        a.test { font-weight: bold; }
     </style> 
 
  </head>
  <body>
    <a href="1.php">1.php</a>
    <a href="2.php">2.php</a>
    <a href="3.php">3.php</a>
    <a href="7.php">7.php</a>
    <pre class="result">No result yet.</pre>
  </body>
</html>
EOD;


// -------------------------------------------------------------------------------------------
//
// Create and print out the html-page
//
echo $html;
/*
$title         = "Testing jQuery";
require_once('page.php');
*/

?>