Einzelnen Beitrag anzeigen
  #1 (permalink)  
Alt 18.06.2009, 10:19
crossgolfer85 crossgolfer85 ist offline
Benutzer
neuer user
Thread-Ersteller
 
Registriert seit: 13.06.2009
Beiträge: 30
crossgolfer85 befindet sich auf einem aufstrebenden Ast
Standard JQuery: Datei in Container laden

Hallo,
ich versuch mich gerade an JQuery.

Ich lade eine php-Datei in einen Container und tausche die Inhalte mit Links entsprechend aus. Das funktioniert auch soweit mit normalen Inhalten (Text).

Ich möchte aber nun verschiedene ImageFlow-Galerien darin entsprechend laden. Das ImageFlow-Script wird aber nicht angezeigt.

Wo muss ich die imageflow.js und imageflow.css einbinden? In die Datei die nachgeladen wird oder nur in die Ursprungsdatei? Funktioniert irgendwie beides nicht...

Folgendes habe ich im Head stehen:
PHP-Code:
jQuery(document).ready(function(){
  
// Wenn kein Request ausgefuehrt wurde folgende Datei laden:
  
jQuery("#boxImageFlowStart").load("flow.php?art=random");
  
// Wenn klick auf id=random
  
jQuery("#random").click(function(){jQuery("#boxImageFlowStart").load("flow.php?art=random");});
  
// Wenn klick auf id=toprated
  
jQuery("#toprated").click(function(){jQuery("#boxImageFlowStart").load("flow.php?art=toprated");});
  
// Webnn klick auf id=recent
  
jQuery("#recent").click(function(){jQuery("#boxImageFlowStart").load("flow.php?art=recent");});
  
}); 
Und im Body:
HTML-Code:
<a href="javascript:void(0);" id="random">Inhalt random</a>
<a href="javascript:void(0);" id="toprated">Inhalt toprated</a>
<a href="javascript:void(0);" id="recent">Inhalt recent</a>

Meine flow.php:
HTML-Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
    <link rel="stylesheet" href="./css/imageflow.css" title="stylesheet" type="text/css" media="screen" />
    <script type="text/javascript" src="./include/js/imageflow.js"></script>
    <title></title>
  </head>
  <body>

  
  <div id="FlowHome" class="imageflow">
	<img src="img/at_symbol.jpg" longdesc="img/img1.png" width="400" height="300" alt="Image 1" />
	<img src="img/datenscheiben.jpg" longdesc="img/img2.png" width="300" height="400" alt="Image 2" />
	<img src="img/farbraum.jpg" longdesc="img/img3.png" width="400" height="400" alt="Image 3" />
	<img src="img/fries.jpg" longdesc="img/img1.png" width="400" height="300" alt="Image 4" />
	<img src="img/kunst.jpg" longdesc="img/img2.png" width="300" height="400" alt="Image 5" />
	<img src="img/platsch.jpg" longdesc="img/img1.png" width="400" height="300" alt="Image 6" />
	<img src="img/raetsel_1.jpg" longdesc="img/img2.png" width="300" height="400" alt="Image 7" />
	<img src="img/raetsel_2.jpg" longdesc="img/img3.png" width="400" height="400" alt="Image 8" />
	<img src="img/stimme_von_oben.jpg" longdesc="img/img1.png" width="400" height="300" alt="Image 9" />
  </div>    
  
  
  </body>
</html>

Geändert von crossgolfer85 (18.06.2009 um 10:23 Uhr) Grund: Geändert weil Code der flow.php vergessen
Mit Zitat antworten
Sponsored Links