Jump to content
php.lv forumi
  • 0

include() ielāde


eT`

Question

Tamm man ir includots fails, kurš sastāv no 3 tabiem, un pirms JS pilnīgas ielādes, visi tabu elementi parādās viens zem otra, un tikai tad sakārtojas pareizi.

Lai gan JS ielādējas ~0.5sek tik un tā to var redzēt.

 

Gribētos zināt, kā var uzlikt, lai to include ielādē tikai tad, kad laa ir pilnībā ielādētā, un kamēr lapa nav ielādēta rāda kaut kādu loading riņķīti vai ko tādu.

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

index

<div class="left_header">
   Jaunākais
   </div>
   <?
include_once('tmp/tabber.php');
?>

 

tabber

<div class="tabber">

     <div class="tabbertab tabbertabdefault" title="FORUMĀ">
       <?php
	for($i=1;$i<11;$i++)
	{
	echo '<li><img src="' . $_SITEURL . '/templates/v1/images/new.png" /><a href="#">Foruma ieraksts</a></li>';	
	}
	?>
     </div>

     <div class="tabbertab" title="BANOS">
       <?php
	for($i=1;$i<11;$i++)
	{
	echo '<li><img src="' . $_SITEURL . '/templates/v1/images/new.png" /><a href="#">Bans</a></li>';	
	}
	?>
     </div>

     <div class="tabbertab" title="ČATĀ">
       <?php
	for($i=1;$i<11;$i++)
	{
	echo '<li><a href="#">Čata ziņa</a></li>';	
	}
	?>
     </div>

</div>

 

un header.php

<script type="text/javascript" src="<?=$_SITEURL?>/templates/v1/js/tabber.js"></script>

Edited by eT`
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...