ziedinjsh Posted November 9, 2010 Report Share Posted November 9, 2010 lejupielādēju šādu ajax loader. gribu izmantot viņu kā div loaderu. <script type='text/javascript'> QueryLoader.selectorPreload = ".page"; QueryLoader.init(); </script> </head> <?php error_reporting(E_ALL); include "misc/connect.php"; include "misc/paypal.php"; include "misc/player.php"; $id = (isset($_GET['id'])) ? $_GET['id'] : ''; echo "<div class='warp'>"; echo "<div class='menu'>"; echo "<ul>"; echo "<li><a href='index.php' ".(($id == "") ? "class='current'" : "")."\">Home</a></li>"; echo "<li><a href='index.php?id=samples' ".(($id == "samples") ? "class='current'" : "")."\">Samples</a></li>"; echo "<li><a href='index.php?id=d7' ".(($id == "d7") ? "class='current'" : "")."\">D7</a></li>"; echo "<li><a href='index.php?id=add_d7'>ADD D7</a></li>"; echo "<div class='fix'></div>"; echo "</ul>"; echo "</div>"; echo "<div class='page'>"; if($id==''){ echo "Home"; } if ($id=='samples'){ echo "Samples"; include "samples.php"; } if ($id=='d7'){ include "d7.php"; } if ($id=='add_d7'){ include "add/d7.php"; } echo "</div>"; echo "</div>"; uzspiežot uz linku home rādās viss melns, uzspiežot uz linku samples rādās viss melns, uzspiežot uz linku d7 viss nostrādā ielādē div, bet atkal nospiežot uz nākamo linku viss ir melns.. kapēc tā? Quote Link to comment Share on other sites More sharing options...
ziedinjsh Posted November 11, 2010 Author Report Share Posted November 11, 2010 Varbūt kāds tad var ieteikt kādu citu ajax kodu ar kuru ielādēt div saturu? Quote Link to comment Share on other sites More sharing options...
indoom Posted November 11, 2010 Report Share Posted November 11, 2010 http://api.jquery.com/load/ Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.