Jump to content
php.lv forumi
  • 0

Jquery Load un Show


reiniger

Question

Sveiki.

Vajadzīga neliela palīdzība.

Vajadzīgs lai ielādē test.php pec visas lapas ielādes un lai tas parādītos ta lēnām iznisrstoši.

<script type="text/javascript">
function showNewContent() {  
   $('#div_show').show("slow");  
}  

$(document).ready(function() {
    $('#div_show').load('/test.php','',showNewContent());
});    
</script>

Šādu neta atradu, bet nestrādā!

Kas par vainu varētu būt?

Edited by reiniger
Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

pa priekšu, noteikti, tam divam jāuzliek .hide() un callback funkciju vai nu ieliek anonīmā funkcijā function(){showNewContent()}, vai norāda tikai nosaukumu bez iekavām

$(document).ready(function() {
    $('#div_show').hide().load('/test.php',showNewContent);
}); 

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...