Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- লেইসফিতা প্রজেক্ট রিলেটেড কিছু কোড
- =============================================
- <?php echo human_time_diff( get_the_time('U'), current_time('timestamp') ) . ' ago'; ?> ----- সময় আনার জন্য কত মিনিট আনার জন্য ।
- ইনফিনিট স্ক্রল নিয়ে কাজ করার জন্য
- =========================================
- <!--Infinti Scrolling-->
- <script type="text/javascript" src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
- <script type="text/javascript">
- var nextPage = 2;
- var loadingPage = false;
- var urlPrefix = "http://localhost/infinte/?paged=";
- var urlSuffix = "/"
- function infinitiScroll() {
- if(!loadingPage) {
- loadingPage = true;
- $.get(urlPrefix + nextPage + urlSuffix, function(data){
- $(data).find('#content').find(".blogContent").appendTo('.blogContent');
- }).done(function(){
- nextPage++;
- loadingPage = false;
- }).fail(function(){
- $('.navigation').css({display: 'none'});
- });
- }
- }
- $(document).ready(function(){
- $(".nav-previous a").click(function(){
- infinitiScroll();
- return false;
- })
- });
- $(window).scroll(function(){
- var positionNav = $(".nav-previous").offset().top;
- var top = $(document).scrollTop();
- var windowHeight = $(window).height();
- if(top + windowHeight > positionNav - 100) {
- infinitiScroll();
- }
- });
- </script>
- ফিক্সড সাইডবার
- ===================
- .fixed {
- position:fixed;
- top:0;
- z-index:998;
- }
- <script type="text/javascript">
- $(document).ready(function () {
- var top = $('.lates_fixed').offset().top;
- $(window).scroll(function (event) {
- var y = $(this).scrollTop();
- if (y >= top)
- $('.lates_fixed').addClass('fixed');
- else
- $('.lates_fixed').removeClass('fixed');
- $('.lates_fixed').width($('.lates_fixed').parent().width());
- });
- });
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement