PHP Classes

File: index.php

Recommend this page to a friend!
  Classes of Muhammad Asif Ali   PHP Collapsible Accordion   index.php   Download  
File: index.php
Role: Example script
Content type: text/plain
Description: home + sample
Class: PHP Collapsible Accordion
Display HTML content in accordion page sections
Author: By
Last change: changed SRC attribut locations for CSS and SCRIPT tags.
Date: 15 years ago
Size: 2,987 bytes
 

Contents

Class file image Download
<!--

    Developer: Muhammad Asif Ali, Karachi. Pakistan
    Description: Javascript Accordion Script, Converted into PHP.
    Resources Original Location: http://www.dynamicdrive.com/dynamicindex17/ddaccordion.htm
   
    Email & Critics/Comments: aceph_@hotmail.com
    URL: funheaven.wordpress.com
   
   
    Just Use this file for directions. Follow the following 5 steps to make it work!
    Remember to put things in proper html tags. Like here.
    Fianl Step! ... Enjoy!

-->


<html>
<head>

        <!--1.. include the google jquery script -->
        <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
       
       
        <!--2.. include our js file -->
        <script type="text/javascript" src="acc_ddaccordion.js">
       
        /***********************************************
        * Accordion Content script- (c) Dynamic Drive DHTML code library (www.dynamicdrive.com)
        * Visit http://www.dynamicDrive.com for hundreds of DHTML scripts
        * This notice must stay intact for legal use
        ***********************************************/
       
        </script>
       
       
        <!--3.. include our css file -->
        <link rel="stylesheet" type="text/css" href="acc_styles.css">
       
       
        <!--4. make php object, set properties and initialize -->
        <?php
           
include_once('accordion.php');
           
$acc = new accordion();
           
$acc->revealtype = 'click'; //you can set alot of other attributes, just open up the class file and modify things inside __construct()
           
$acc->init();
       
?>


</head>

<body>
        <!--5. Print as many accordions as you want! -->
        <?php
           
//$acc->put('title','content');
           
$acc->put('Dogs','The dog is a domestic subspecies of the wolf, a mammal of the Canidae family of the order Carnivora. The term encompasses both feral and pet varieties and is also sometimes used to describe wild canids of other subspecies or species. The domestic dog has been (and continues to be) one of the most widely-kept working and companion animals in human history, as well as being a food source in some cultures.');
           
$acc->put('Cats','The Cat, also known as the Domestic Cat or House Cat to distinguish it from other felines, is a small carnivorous species of crepuscular mammal that is often valued by humans for its companionship and its ability to hunt vermin. It has been associated with humans for at least 9,500 years.');
           
$acc->put('Rabbits','Rabbits are small mammals in the family Leporidae of the order Lagomorpha, found in several parts of the world. There are seven different genera in the family classified as rabbits, including the European rabbit (Oryctolagus cuniculus), cottontail rabbit (genus Sylvilagus; 13 species), and the Amami rabbit (Pentalagus furnessi, endangered species on Amami O-shima, Japan). There are many other species of rabbit, and these, along with cottontails, pikas, and hares, make up the order Lagomorpha. Rabbits generally live between four and twenty years.</div>');
       
?>


</body>
</html>