Advertisement
BDHexor

লেইসফিতা প্রজেক্ট

Aug 22nd, 2014
561
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.94 KB | None | 0 0
  1. লেইসফিতা প্রজেক্ট রিলেটেড কিছু কোড
  2. =============================================
  3. <?php echo human_time_diff( get_the_time('U'), current_time('timestamp') ) . ' ago'; ?> ----- সময় আনার জন্য কত মিনিট আনার জন্য ।
  4.  
  5. ইনফিনিট স্ক্রল নিয়ে কাজ করার জন্য
  6. =========================================
  7. <!--Infinti Scrolling-->
  8. <script type="text/javascript" src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
  9. <script type="text/javascript">
  10. var nextPage = 2;
  11. var loadingPage = false;
  12. var urlPrefix = "http://localhost/infinte/?paged=";
  13. var urlSuffix = "/"
  14. function infinitiScroll() {
  15. if(!loadingPage) {
  16. loadingPage = true;
  17. $.get(urlPrefix + nextPage + urlSuffix, function(data){
  18. $(data).find('#content').find(".blogContent").appendTo('.blogContent');
  19. }).done(function(){
  20. nextPage++;
  21. loadingPage = false;
  22. }).fail(function(){
  23. $('.navigation').css({display: 'none'});
  24. });
  25. }
  26. }
  27.  
  28. $(document).ready(function(){
  29. $(".nav-previous a").click(function(){
  30. infinitiScroll();
  31. return false;
  32. })
  33. });
  34.  
  35. $(window).scroll(function(){
  36. var positionNav = $(".nav-previous").offset().top;
  37. var top = $(document).scrollTop();
  38. var windowHeight = $(window).height();
  39. if(top + windowHeight > positionNav - 100) {
  40. infinitiScroll();
  41. }
  42. });
  43. </script>
  44.  
  45.  
  46. ফিক্সড সাইডবার
  47. ===================
  48. .fixed {
  49. position:fixed;
  50. top:0;
  51. z-index:998;
  52. }
  53.  
  54. <script type="text/javascript">
  55. $(document).ready(function () {
  56. var top = $('.lates_fixed').offset().top;
  57. $(window).scroll(function (event) {
  58. var y = $(this).scrollTop();
  59. if (y >= top)
  60. $('.lates_fixed').addClass('fixed');
  61. else
  62. $('.lates_fixed').removeClass('fixed');
  63. $('.lates_fixed').width($('.lates_fixed').parent().width());
  64. });
  65. });
  66. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement