Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(document).ready(function(){
- var trigger = false;
- var isLoaded = false;
- $("#getContent").click(function(){
- trigger = 1 - trigger;
- if (trigger) {
- $("#mode").hide();
- if (isLoaded == false) {
- $("#divContent").show(function(){
- $.ajax({
- url: "load.php",
- cache: false,
- beforeSend: function() {
- $('#divContent').html('Получаем контент');
- },
- success: function(html){
- $("#divContent").html(html);
- isLoaded = true;
- }
- });
- return false;
- });
- } else {
- $("#divContent").show();
- }
- } else {
- $("#divContent").hide();
- $("#mode").show();
- }
- return false;
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement