evolve_infinite_scroll_blog

The evolve evolve infinite scroll blog function.

Description

evolve_infinite_scroll_blog(); 

Usage

  1. if ( !function_exists( 'evolve_infinite_scroll_blog' ) ) { 
  2. require_once '/library/functions/basic-functions.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = evolve_infinite_scroll_blog(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/library/functions/basic-functions.php  
  1. function evolve_infinite_scroll_blog() { 
  2. echo '<script> 
  3. if (jQuery(".posts-container-infinite").length == 1) { 
  4. var ias = jQuery.ias({ 
  5. container: ".posts-container-infinite",  
  6. item: "div.post",  
  7. pagination: "div.pagination",  
  8. next: "a.pagination-next",  
  9. }); 
  10.  
  11. ias.extension(new IASTriggerExtension({ 
  12. text: "Load more items",  
  13. offset: 99999 
  14. })); 
  15. ias.extension(new IASSpinnerExtension({ 
  16. })); 
  17. ias.extension(new IASNoneLeftExtension()); 
  18. }else{'; 
  19. $evolve_pagination_type = evolve_get_option('evl_pagination_type', 'pagination'); 
  20. if ($evolve_pagination_type == "infinite" && !is_single() && (is_page_template('blog-page.php') || is_home() )) { 
  21. echo ' 
  22. var ias = jQuery.ias({ 
  23. container: "#primary",  
  24. item: ".post",  
  25. pagination: ".navigation-links",  
  26. next: ".nav-previous a",  
  27. }); 
  28.  
  29. ias.extension(new IASTriggerExtension({ 
  30. text: "Load more items",  
  31. offset: 99999 
  32. })); 
  33. ias.extension(new IASSpinnerExtension({ 
  34. })); 
  35. ias.extension(new IASNoneLeftExtension());'; 
  36. echo '} 
  37. </script>'; 
  38.  
  39.