1. #1
    jorisdebacker's Avatar
    Registered
    23/04/03
    Posts
    35
    iTrader
    0
    Mentioned
    0 Post(s)
    Reputation
    0/0

    JS: motools accordeon

    http://demos.mootools.net/Accordion

    Ik wil deze demo werkend krijgen om zelf dingen te veranderen en zo er uit te leren.
    Ik heb in een htmlpagina de volgende code gezet die bij de demo hoort, de js, css en de html.
    Maar ik krijg deze simpele demo gewoon niet aan de praat.
    Ik zie niet wat er ontbreekt of wat ik fout doe. Is er iemand die kan zien wat er verkeerd is ?
    Ik heb totaal geen kaas gegeten van javascript.

    Bij voorbaat dank.

    M'n DOCTYPE is juist. Moet ik de javascript die erbij hoort in een appart bestandje zetten of mag het ook in de pagina zelf ?

    dit is m'n pagina:

    HTML Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
    <title>demo mootools accordeon</title>
    <link href="link.css" rel="stylesheet" type="text/css" />
    
    <script type="text/javascript">
    		window.addEvent('domready', function(){
    			var accordion = new Accordion('h3.atStart', 'div.atStart', {
    				opacity: false,
    				onActive: function(toggler, element){
    					toggler.setStyle('color', '#ff3300');
    				},
    				
    				onBackground: function(toggler, element){
    					toggler.setStyle('color', '#222');
    				}
    			}, $('accordion'));
    			
    			
    			var newTog = new Element('h3', {'class': 'toggler'}).setHTML('Common descent');
    			
    			var newEl = new Element('div', {'class': 'element'}).setHTML('<p>A group of organisms is said to have common descent if they have a common ancestor. In biology, the theory of universal common descent proposes that all organisms on Earth are descended from a common ancestor or ancestral gene pool.</p><p>A theory of universal common descent based on evolutionary principles was proposed by Charles Darwin in his book The Origin of Species (1859), and later in The Descent of Man (1871). This theory is now generally accepted by biologists, and the last universal common ancestor (LUCA or LUA), that is, the most recent common ancestor of all currently living organisms, is believed to have appeared about 3.9 billion years ago. The theory of a common ancestor between all organisms is one of the principles of evolution, although for single cell organisms and viruses, single phylogeny is disputed</p>');
    			
    			accordion.addSection(newTog, newEl, 0);
    		}); 
    	</script>
    
    </head>
    
    <body>
    
    <h3>
    	accordeon 
    </h3>
    <div id="accordion">
    	<h3 class="toggler atStart">
    		History
    	</h3>
    	<div class="element atStart">
    		<p>
    			The first suggestion that all organisms may have had a common ancestor and diverged
    			through random variation and natural selection was made in 1745 by the French
    			mathematician and scientist Pierre-Louis Moreau de Maupertuis (1698-1759) in his work
    			Venus physique. Specifically:
    		</p>
    		<blockquote>
    			"Could one not say that, in the fortuitous combinations of the productions of nature,
    			as there must be some characterized by a certain relation of fitness which are able
    			to subsist, it is not to be wondered at that this fitness is present in all the
    			species that are currently in existence? Chance, one would say, produced an
    			innumerable multitude of individuals; a small number found themselves constructed in
    			such a manner that the parts of the animal were able to satisfy its needs; in another
    			infinitely greater number, there was neither fitness nor order: all of these latter
    			have perished. Animals lacking a mouth could not live; others lacking reproductive
    			organs could not perpetuate themselves... The species we see today are but the
    			smallest part of what blind destiny has produced..."
    		</blockquote>
    		<p>&nbsp;</p>
    		<p>
    			The famous closing sentence describes the "grandeur in this view of life, with its
    			several powers, having been originally breathed into a few forms or into one." The
    			phrase "one form" here seems to hark back to the phrase "some few beings"; in any
    			case, the choice of words is remarkable for its consistency with recent ideas about
    			there having been a single ancestral "genetic pool".
    		</p>
    	</div>
    	<h3 class="toggler atStart">
    		Evidence of universal common descent
    	</h3>
    	<div class="element atStart">
    		<h4>
    			Common biochemistry and genetic code
    		</h4>
    		<p>
    			All known forms of life are based on the same fundamental biochemical organisation:
    			genetic information encoded in DNA, transcribed into RNA, through the effect of
    			protein- and RNA-enzymes, then translated into proteins by (highly similar)
    			ribosomes, with ATP, NADH and others as energy currencies, etc. Furthermore, the
    			genetic code (the "translation table" according to which DNA information is
    			translated into proteins) is nearly identical for all known lifeforms, from bacteria
    			to humans, with minor local differences. The universality of this code is generally
    			regarded by biologists as definitive evidence in favor of the theory of universal
    			common descent. Analysis of the small differences in the genetic code has also
    			provided support for universal common descent.[2]
    		</p>
    		<h4>
    			Irrelevant differences
    		</h4>
    		<p>
    			Differences which have no relevance to evolution and therefore cannot be explained by
    			convergence, tend to be very compelling support for the universal common descent
    			theory.
    		</p>
    		<p>
    			Such evidence has come from two domains: amino acid sequences and DNA sequences.
    			Proteins with the same 3-d structure need not have identical amino acid sequences;
    			any irrelevant similarity between the sequences is evidence for common descent. In
    			certain cases, there are several codons (DNA triplets) that code for the same amino
    			acid. Thus, if two species use the same codon at the same place to specify an amino
    			acid that can be represented by more than one codon, that is evidence for recency of
    			a common ancestor.
    		</p>
    		<p>
    			The universality of many aspects of cellular life is often pointed to as supportive
    			evidence to the more compelling evidence listed above. These similarities include the
    			energy carrier ATP, and the fact that all amino acids found in proteins are
    			left-handed. It is possible that these similarities resulted because of the laws of
    			physics and chemistry, rather than universal common descent and therefore resulted in
    			convergent evolution.
    		</p>
    		<h4>
    			Phylogenetic trees
    		</h4>
    		<p>
    			Another important piece of evidence is that it is possible to construct detailed
    			phylogenetic trees mapping out the proposed divisions and common ancestors of
    			species, and no matter what method is used, morphological (based on appearance,
    			embryology, etc) or molecular (based on mutation rates and relative similarities of
    			important, conserved genes), still get extremely similar results. If there were no
    			common ancestor, these different methods should give wildly different results, thus
    			the phylogenetic tree is strong evidence of common descent.
    		</p>
    		<div style="clear:both"></div>
    	</div>
    	<h3 class="toggler atStart">
    		Examples of common descent
    	</h3>
    	<div class="element atStart">
    		<h4>
    			Artificial selection
    		</h4>
    		<p>
    			Artificial selection offers remarkable examples of the amount of diversity that can
    			exist between individuals sharing a late common ancestor. To perform artificial
    			selection, one begins with a particular species (following examples include wolves
    			and wild cabbage) and then, at every generation, only allow certain individuals to
    			reproduce, based on the degree to which they exhibit certain desirable
    			characteristics. In time, it is expected that these characteristics become
    			increasingly well-developed in successive generations. Many examples of artificial
    			selection, like the ones below, occurred without the guidance of modern scientific
    			insight.
    		</p>
    		<h4>
    			Dog breeding
    		</h4>
    		<p>
    			An obvious example of the power of artificial selection is the diversity found in
    			various breed in domesticated dogs. The various breeds of dogs all share common
    			ancestry (being all ultimately descended from wolves) but were domesticated by humans
    			and then selectively bred in order to enhance various features such as coat color and
    			length or body size. To see the wide range of difference between the many breeds of
    			dogs compare the Chihuahua, Great Dane, Basset Hound, Pug, and Poodle. Also compare
    			this enormous diversity with the relative uniformity of wild wolves.
    		</p>
    	</div>
    </div>
    </body>
    </html>
    no votes  

  2. #2
    frenzal's Avatar
    Registered
    20/12/02
    Location
    Antwerpen
    Posts
    1,319
    iTrader
    8 (100%)
    Mentioned
    0 Post(s)
    Reputation
    0/1
    misschien de moofx library includen
    no votes  

  3. #3
    jorisdebacker's Avatar
    Registered
    23/04/03
    Posts
    35
    iTrader
    0
    Mentioned
    0 Post(s)
    Reputation
    0/0
    <script type="text/javascript" src="mootools.js"></script> heb ik er bij gezet maar werkt ook niet.
    Op de pagina met de downloads heb ik de components : mootools.js
    no votes  

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Log in

Log in