Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [JavaScript][PHP] jquery tabs
blizniak
post 20.10.2009, 16:05:54
Post #1





Grupa: Zarejestrowani
Postów: 253
Pomógł: 0
Dołączył: 14.04.2005

Ostrzeżenie: (0%)
-----


mam taki kod
  1. <script type="text/javascript">
  2. $(function() {
  3. $("#tabs").tabs();
  4. });
  5. </script>
  6.  
  7. <div id="tabs">
  8. <ul>
  9. <li><a href="#tabs-1">Nunc tincidunt</a></li>
  10. <li><a href="#tabs-2">Proin dolor</a></li>
  11.  
  12. <li><a href="#tabs-3">Aenean lacinia</a></li>
  13. <li><a href="#tabs-4">Nunc tincidunt</a></li>
  14. <li><a href="#tabs-5">Proin dolor</a></li>
  15.  
  16. </ul>
  17.  
  18.  
  19. <div id="tabs-1">
  20. werwerewrew
  21. </div>
  22. <div id="tabs-2">
  23. <p>jkhiuh</p>
  24.  
  25. </div>
  26. <div id="tabs-3">
  27. <p>utyuyuyuyu</p>
  28. </div>
  29. <div id="tabs-4">
  30. tyututyut
  31. </div>
  32. <div id="tabs-5">
  33. tutyu
  34. </div>
  35. </div>
  36.  

czemu jak wstawie php pomiedzy div to sie sypie

  1.  
  2. <div id="tabs-1">
  3. <? include("sdfsdfdsf.php"); ?>
  4. </div>
  5.  

Go to the top of the page
+Quote Post
Fantazyn
post 20.10.2009, 16:19:33
Post #2





Grupa: Zarejestrowani
Postów: 135
Pomógł: 38
Dołączył: 24.02.2007
Skąd: Warszawa

Ostrzeżenie: (10%)
X----


Cytat(blizniak @ 20.10.2009, 17:05:54 ) *
Spróbuj

  1.  
  2. <div id="tabs-1">
  3. <?php include("sdfsdfdsf.php"); ?>
  4. </div>
  5.  


Możliwe, że nie masz ustawionych short tags dla php i stąd błąd (zgaduję, bo nie podałeś komunikatu błędu), spróbuj zamiast
Kod
<? ?>

pisać

<?php ?>


Pozdrawiam


--------------------
Go to the top of the page
+Quote Post
piotrooo89
post 20.10.2009, 16:25:15
Post #3


Newsman


Grupa: Moderatorzy
Postów: 4 005
Pomógł: 548
Dołączył: 7.04.2008
Skąd: Trzebinia/Kraków




polecam zrobić tak:

  1. <link type="text/css" href="http://jqueryui.com/latest/themes/base/ui.all.css" rel="stylesheet" />
  2.  
  3. <script type="text/javascript" src="http://jqueryui.com/latest/jquery-1.3.2.js"></script>
  4. <script type="text/javascript" src="http://jqueryui.com/latest/ui/ui.core.js"></script>
  5. <script type="text/javascript" src="http://jqueryui.com/latest/ui/ui.tabs.js"></script>
  6. <script type="text/javascript">
  7. $(document).ready(function(){
  8. $("#tabs").tabs();
  9. });
  10. </script>
  11.  
  12.  
  13. <div id="tabs">
  14. <ul>
  15. <li><a href="#fragment-1"><span>One</span></a></li>
  16. <li><a href="#fragment-2"><span>Two</span></a></li>
  17. <li><a href="#fragment-3"><span>Three</span></a></li>
  18. </ul>
  19. <div id="fragment-1">
  20. <?php include('test.php'); ?>
  21. </div>
  22. <div id="fragment-2">
  23.  
  24. </div>
  25. <div id="fragment-3">
  26.  
  27. </div>
  28. </div>


--------------------
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Wersja Lo-Fi Aktualny czas: 21.06.2025 - 19:25