daily pastebin goal
41%
SHARE
TWEET

Untitled

a guest Jan 23rd, 2019 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $(window).scroll(function () {
  2.  
  3.    var ajaxloadrelativepost = $(".ajax-load-relative-post").offset().top;
  4.     var topOfWindow = $(window).scrollTop();
  5.  
  6.    console.log(ajaxloadrelativepost + "----" + topOfWindow);
  7.  
  8.     if(ajaxloadrelativepost < topOfWindow + 1000 ) {
  9.  
  10.          console.log(".");
  11.  
  12.        $.ajax({
  13.             type: "GET"
  14.             , url: "https://sluga92.loc/wp-content/themes/sluga92/single-other.php"
  15.              ,data: "test=1"
  16.              ,success: function(data) {
  17.                $(".ajax-load-relative-post").html(data);}
  18.         }).done(function (data) {
  19.  
  20.  
  21.         });
  22.         return false;
  23.  
  24.  
  25.     }
  26.  
  27.     });
  28.    
  29. if ($_POST["test"]==1){
  30.  
  31.  
  32.           $wp_related_posts = wp_related_posts();
  33.           echo $wp_related_posts;
  34.  
  35.     }
  36.  
  37.     ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top