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

2.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>
  <head>
    <script type="text/javascript" src="jquery-1.4.1.min.js"></script>

<!--
    <script type="text/javascript">
        window.onload = function(){ alert("welcome"); }
    </script> 
-->
<!--
    <script type="text/javascript">
        $(document).ready(function(){
               $("a").click(function(event){
                 alert("Thanks for visiting!");
               });
         });
    </script> 
-->

    <script type="text/javascript">
         $(document).ready(function(){
               $("a").click(function(event){
                 alert("As you can see, the link no longer took you to jquery.com");
                 event.preventDefault();
               });
         });
    </script> 
    
  </head>
  <body>
    <a href="http://jquery.com/">jQuery</a>
  </body>
</html>
EOD;


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

?>