{"id":366,"date":"2016-08-19T19:12:19","date_gmt":"2016-08-19T19:12:19","guid":{"rendered":"http:\/\/stackofcodes.in\/?p=208"},"modified":"2016-08-19T19:12:19","modified_gmt":"2016-08-19T19:12:19","slug":"pagination-with-scroll-using-ajax","status":"publish","type":"post","link":"https:\/\/www.chandansharma.co.in\/blog\/pagination-with-scroll-using-ajax\/","title":{"rendered":"pagination with scroll using ajax"},"content":{"rendered":"<pre><span style=\"text-decoration: underline;\"><strong>HTML PAGE IS HERE: IN CODEIGNITER::\n<\/strong><\/span>\n&lt;!DOCTYPE html&gt;\n&lt;html lang=\"en\"&gt;\n &lt;head&gt;\n &lt;meta charset=\"utf-8\"&gt;\n &lt;title&gt;Show More Testing&lt;\/title&gt;\n\n &lt;style type=\"text\/css\"&gt;\n\n ::selection{ background-color: #E13300; color: white; }\n ::moz-selection{ background-color: #E13300; color: white; }\n ::webkit-selection{ background-color: #E13300; color: white; }\n\n body {\n background-color: #fff;\n margin: 40px;\n font: 13px\/20px normal Helvetica, Arial, sans-serif;\n color: #4F5155;\n }\n\n a {\n color: #003399;\n background-color: transparent;\n font-weight: normal;\n }\n\n h1 {\n color: #444;\n background-color: transparent;\n border-bottom: 1px solid #D0D0D0;\n font-size: 19px;\n font-weight: normal;\n margin: 0 0 14px 0;\n padding: 14px 15px 10px 15px;\n }\n\n code {\n font-family: Consolas, Monaco, Courier New, Courier, monospace;\n font-size: 12px;\n background-color: #f9f9f9;\n border: 1px solid #D0D0D0;\n color: #002166;\n display: block;\n margin: 14px 0 14px 0;\n padding: 12px 10px 12px 10px;\n }\n\n #body{\n margin: 0 15px 0 15px;\n }\n\n p.footer{\n text-align: right;\n font-size: 11px;\n border-top: 1px solid #D0D0D0;\n line-height: 32px;\n padding: 0 10px 0 10px;\n margin: 20px 0 0 0;\n }\n\n #container{\n margin: 10px;\n border: 1px solid #D0D0D0;\n -webkit-box-shadow: 0 0 8px #D0D0D0;\n }\n \n .PROROW_CONTNR\n {\n border: 1px solid grey;\n margin-bottom: 6px;\n padding: 6px;\n box-sizing: border-box;\n background: white;\n }\n .span_SP12\n {\n border: 1px solid lightgrey;\n padding: 3px;\n margin-right: 10px; \n }\n .PRO_FLEX1\n {\n background: #d3d3d3;\n padding: 5px;\n }\n .PRO_SHWNGMSG2\n {\n padding: 5px;\n text-align: center;\n\n }\n .SHWMORE_BTN\n {\n border: 1px solid grey;\n margin-bottom: 6px;\n padding: 6px;\n box-sizing: border-box;\n background: lightblue;\n width: 50%;\n margin-left: 25%;\n text-align: center;\n }\n ._SP12_MR11\n {\n font-size: 19px;\n cursor: pointer;\n padding: 5px;\n }\n &lt;\/style&gt;\n &lt;script type=\"text\/javascript\" src=\"https:\/\/code.jquery.com\/jquery-1.10.2.js\"&gt;&lt;\/script&gt;\n &lt;\/head&gt;\n &lt;body&gt;\n \n &lt;script&gt; \n    var GLOBAL_SXMR_XSNDRQST = true; \n    $(document).ready(function() \n    { \n       busy = false;\n \n       $(window).scroll(function() \n       {\n          if(GLOBAL_SXMR_XSNDRQST === true)\n          {\n             if ($(window).scrollTop() + $(window).height() &gt;                    $(\"#PRO_MAIN_CONTER\").height() &amp;&amp; !busy ) \n {\n    busy = true;\n    getscrld_prdctnow();\n }\n }\n });\n \n \n });\n \n \n var GLOBAL_SXMR_XPRODID = 0;\n var GLOBAL_SXMR_XLASTCNT = 0;\n var GLOBAL_SXMR_XTOTPROD = 0;\n function getscrld_prdctnow()\n {\n \n $.ajax({\n url:'http:\/\/localhost\/sharma\/showmorescroll\/scroll-getmoredata',\n type: 'POST',\n data:{'LID':GLOBAL_SXMR_XPRODID,'LCNT':GLOBAL_SXMR_XLASTCNT,'TPROD':GLOBAL_SXMR_XTOTPROD},\n success:function(html){\n \/\/alert (data);\n $(\"._XzscrlMr_PDZ99\").remove();\n $(\"#PRO_MAIN_CONTER\").append(html);\n busy = false;\n window.busy = false;\n },\n error: function () {\n \/\/alert('Some error');\n }\n });\n }\n &lt;\/script&gt;\n \n &lt;div id=\"container\"&gt;\n &lt;h1 style=\"text-align:center; \"&gt;TESTING&lt;\/h1&gt;\n &lt;div id=\"body\"&gt;\n &lt;div class=\"PRO_MAIN_CONTER\" id=\"PRO_MAIN_CONTER\"&gt;\n \n &lt;div class=\"PRO_FLEX1\" id=\"PRO_FLEX1\"&gt;\n &lt;?php\n $SHMOR_COUNT = 1;\n $SHMOR_TMP_UPTO_ROW = 0;\n $SHMOR_LAST_PROD_ID = 0;\n if($FOUND)\n {\n foreach($PRODUCTS as $DBPRO)\n {\n $product_id = $DBPRO['product_id'];\n $product_title = $DBPRO['product_title'];\n $product_price = $DBPRO['product_price'];\n $product_slug = $DBPRO['product_slug'];\n $SHMOR_LAST_PROD_ID = $product_id;\n $SHMOR_COUNT++;\n ?&gt;\n &lt;div class=\"PROROW_CONTNR\"&gt;\n &lt;span class=\"span_SP12\"&gt; SL NO: &lt;?php echo $product_id;?&gt;&lt;\/span&gt;\n &lt;span&gt;&lt;?php echo $product_slug;?&gt;&lt;\/span&gt;\n &lt;\/div&gt;\n\n &lt;?php\n }\n $SHMOR_TMP_UPTO_ROW = $SHMOR_COUNT-1;\n }\n ?&gt;\n \n &lt;\/div&gt;\n &lt;div class=\"PRO_SHWNGMSG2 \"&gt;Showing Products Upto &lt;?php echo $SHMOR_TMP_UPTO_ROW;?&gt; in &lt;?php echo $TOTAL_PRODUCTS;?&gt;&lt;\/div&gt; \n &lt;input type=\"hidden\" name=\"\" class=\"_XzscrlMr_PDZ99\" id=\"MOREAFTR-&lt;?php echo $SHMOR_LAST_PROD_ID;?&gt;\" data-moreaftr=\"&lt;?php echo $SHMOR_LAST_PROD_ID;?&gt;\" data-lstcnt=\"&lt;?php echo $SHMOR_COUNT;?&gt;\" &gt;\n\n &lt;script&gt;\n var GLOBAL_SXMR_XTOTPROD = &lt;?php echo $TOTAL_PRODUCTS;?&gt;;\n var GLOBAL_SXMR_XPRODID = &lt;?php echo $SHMOR_LAST_PROD_ID;?&gt;;\n var GLOBAL_SXMR_XLASTCNT = &lt;?php echo $SHMOR_COUNT;?&gt;;\n var GLOBAL_SXMR_XSNDRQST = true;\n &lt;\/script&gt;\n &lt;\/div&gt;\n &lt;\/div&gt;\n\n &lt;\/div&gt;\n &lt;\/body&gt;\n&lt;\/html&gt;<\/pre>\n<pre><span style=\"text-decoration: underline;\"><strong>In the Controller:\n<\/strong><\/span>&lt;?PHP\n\nclass Scrollmore extends CI_Controller \n{ \n public function index()\n {\n $this-&gt;db-&gt;select(\"*\");\n $this-&gt;db-&gt;from(\"td_product\");\n $this-&gt;db-&gt;order_by('product_id', 'ASC');\n $this-&gt;db-&gt;limit(15); \n $SHR14_GETPRO_QU = $this-&gt;db-&gt;get();\n $SHR14_GETPRO_RES_ROW = $SHR14_GETPRO_QU-&gt;num_rows();\n $SHR14_GETPRO_RES = $SHR14_GETPRO_QU-&gt;result_array();\n\n \n \/\/ USED TO GET TOTAL PRODUCTS \n $this-&gt;db-&gt;select(\"*\");\n $this-&gt;db-&gt;from(\"td_product\");\n $this-&gt;db-&gt;order_by('product_id', 'ASC'); \n $SHR15_GETPRO_QU = $this-&gt;db-&gt;get();\n $SHR15_GETPRO_RES_ROW = $SHR15_GETPRO_QU-&gt;num_rows();\n \n \n $PASSING_ARR = array();\n $PASSING_ARR['TOTAL_PRODUCTS'] = $SHR15_GETPRO_RES_ROW;\n \n $PASSING_ARR['FOUND'] = $SHR14_GETPRO_RES_ROW;\n \n $PASSING_ARR['PRODUCTS'] = $SHR14_GETPRO_RES;\n $this-&gt;load-&gt;view('scrollmore_main',$PASSING_ARR);\n }\n \n public function getby_scrollmore()\n {\n $GOT_LAST_PID = $_POST['LID'];\n $GOT_LAST_ROW = $_POST['LCNT'];\n $GOT_TOTAL_PROD = $_POST['TPROD'];\n $GOT_LAST_ROWPLUS = $GOT_LAST_ROW;\n \n $this-&gt;db-&gt;select(\"*\");\n $this-&gt;db-&gt;from(\"td_product\");\n $this-&gt;db-&gt;where(\"product_id &gt; $GOT_LAST_PID\");\n $this-&gt;db-&gt;order_by('product_id', 'ASC');\n $this-&gt;db-&gt;limit(10);\n $SHR14_GETPRO_QU = $this-&gt;db-&gt;get();\n $SHR14_GETPRO_RES_ROW = $SHR14_GETPRO_QU-&gt;num_rows();\n $SHR14_GETPRO_RES = $SHR14_GETPRO_QU-&gt;result_array();\n \n $SHMOR_COUNT = $GOT_LAST_ROW;\n $GOT_UPTO_ROW = 0;\n $SHMOR_LAST_PROD_ID = 0;\n if($SHR14_GETPRO_RES_ROW)\n {\n ?&gt;\n &lt;div class=\"PRO_FLEX1\"&gt;\n &lt;?php\n\n foreach($SHR14_GETPRO_RES as $DBPRO)\n {\n $product_id = $DBPRO['product_id'];\n $product_title = $DBPRO['product_title'];\n $product_price = $DBPRO['product_price'];\n $product_slug = $DBPRO['product_slug'];\n $SHMOR_LAST_PROD_ID = $product_id;\n $SHMOR_COUNT++;\n ?&gt;\n &lt;div class=\"PROROW_CONTNR\"&gt;\n &lt;span class=\"span_SP12\"&gt; SL NO: &lt;?php echo $product_id;?&gt;&lt;\/span&gt;\n &lt;span&gt;&lt;?php echo $product_slug;?&gt;&lt;\/span&gt;\n &lt;\/div&gt;\n\n &lt;?php\n }\n $GOT_UPTO_ROW = $SHMOR_COUNT-1;\n ?&gt;\n\n &lt;\/div&gt;\n &lt;div class=\"PRO_SHWNGMSG2\"&gt;Showing Products From &lt;?php echo $GOT_LAST_ROWPLUS; ?&gt; Upto &lt;?php echo $GOT_UPTO_ROW;?&gt; in &lt;?php echo $GOT_TOTAL_PROD;?&gt;&lt;\/div&gt; \n &lt;input type=\"hidden\" name=\"\" class=\"_XzscrlMr_PDZ99\" id=\"MOREAFTR-&lt;?php echo $SHMOR_LAST_PROD_ID;?&gt;\" data-moreaftr=\"&lt;?php echo $SHMOR_LAST_PROD_ID;?&gt;\" data-lstcnt=\"&lt;?php echo $SHMOR_COUNT;?&gt;\" &gt;\n &lt;script&gt; \n var GLOBAL_SXMR_XTOTPROD = &lt;?php echo $GOT_TOTAL_PROD;?&gt;;\n var GLOBAL_SXMR_XPRODID = &lt;?php echo $SHMOR_LAST_PROD_ID;?&gt;;\n var GLOBAL_SXMR_XLASTCNT = &lt;?php echo $SHMOR_COUNT;?&gt;;\n var GLOBAL_SXMR_XSNDRQST = true;\n &lt;\/script&gt;\n &lt;?php\n }\n else\n {\n ?&gt;\n &lt;div class=\"PRO_SHWNGMSG2\"&gt;Currently No More Products&lt;\/div&gt;\n &lt;script&gt; \n var GLOBAL_SXMR_XSNDRQST = false;\n &lt;\/script&gt; \n \n &lt;?php \n }\n }\n}\n?&gt;\n\nROUTES:\n$route['default_controller'] = \"scrollmore\";\n$route['scroll-getmoredata'] = \"scrollmore\/getby_scrollmore\";<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>HTML PAGE IS HERE: IN CODEIGNITER:: &lt;!DOCTYPE html&gt; &lt;html lang=&#8221;en&#8221;&gt; &lt;head&gt; &lt;meta charset=&#8221;utf-8&#8243;&gt; &lt;title&gt;Show More Testing&lt;\/title&gt; &lt;style type=&#8221;text\/css&#8221;&gt; ::selection{ background-color: #E13300; color: white; } ::moz-selection{ &hellip; <\/p>\n<div class='heateor_sss_sharing_container heateor_sss_vertical_sharing heateor_sss_bottom_sharing' style='width:44px;left: -10px;top: 120px;-webkit-box-shadow:none;box-shadow:none;' data-heateor-sss-href='https:\/\/www.chandansharma.co.in\/blog\/wp-json\/wp\/v2\/posts\/366'><div class=\"heateor_sss_sharing_ul\"><a aria-label=\"Facebook\" class=\"heateor_sss_facebook\" href=\"https:\/\/www.facebook.com\/sharer\/sharer.php?u=https%3A%2F%2Fwww.chandansharma.co.in%2Fblog%2Fwp-json%2Fwp%2Fv2%2Fposts%2F366\" title=\"Facebook\" rel=\"nofollow noopener\" target=\"_blank\" style=\"font-size:32px!important;box-shadow:none;display:inline-block;vertical-align:middle\"><span class=\"heateor_sss_svg\" style=\"background-color:#3c589a;width:40px;height:40px;margin:0;display:inline-block;opacity:1;float:left;font-size:32px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box\"><svg style=\"display:block;\" focusable=\"false\" aria-hidden=\"true\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"100%\" height=\"100%\" viewBox=\"-5 -5 42 42\"><path d=\"M17.78 27.5V17.008h3.522l.527-4.09h-4.05v-2.61c0-1.182.33-1.99 2.023-1.99h2.166V4.66c-.375-.05-1.66-.16-3.155-.16-3.123 0-5.26 1.905-5.26 5.405v3.016h-3.53v4.09h3.53V27.5h4.223z\" fill=\"#fff\"><\/path><\/svg><\/span><\/a><a aria-label=\"Twitter\" class=\"heateor_sss_button_twitter\" href=\"http:\/\/twitter.com\/intent\/tweet?text=Logic%20Bytes%20-%20Spread%20Your%20Knowledge&url=https%3A%2F%2Fwww.chandansharma.co.in%2Fblog%2Fwp-json%2Fwp%2Fv2%2Fposts%2F366\" title=\"Twitter\" rel=\"nofollow noopener\" target=\"_blank\" style=\"font-size:32px!important;box-shadow:none;display:inline-block;vertical-align:middle\"><span class=\"heateor_sss_svg heateor_sss_s__default heateor_sss_s_twitter\" style=\"background-color:#55acee;width:40px;height:40px;margin:0;display:inline-block;opacity:1;float:left;font-size:32px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box\"><svg style=\"display:block;\" focusable=\"false\" aria-hidden=\"true\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"100%\" height=\"100%\" viewBox=\"-4 -4 39 39\"><path d=\"M28 8.557a9.913 9.913 0 0 1-2.828.775 4.93 4.93 0 0 0 2.166-2.725 9.738 9.738 0 0 1-3.13 1.194 4.92 4.92 0 0 0-3.593-1.55 4.924 4.924 0 0 0-4.794 6.049c-4.09-.21-7.72-2.17-10.15-5.15a4.942 4.942 0 0 0-.665 2.477c0 1.71.87 3.214 2.19 4.1a4.968 4.968 0 0 1-2.23-.616v.06c0 2.39 1.7 4.38 3.952 4.83-.414.115-.85.174-1.297.174-.318 0-.626-.03-.928-.086a4.935 4.935 0 0 0 4.6 3.42 9.893 9.893 0 0 1-6.114 2.107c-.398 0-.79-.023-1.175-.068a13.953 13.953 0 0 0 7.55 2.213c9.056 0 14.01-7.507 14.01-14.013 0-.213-.005-.426-.015-.637.96-.695 1.795-1.56 2.455-2.55z\" fill=\"#fff\"><\/path><\/svg><\/span><\/a><a aria-label=\"Linkedin\" class=\"heateor_sss_button_linkedin\" href=\"https:\/\/www.linkedin.com\/sharing\/share-offsite\/?url=https%3A%2F%2Fwww.chandansharma.co.in%2Fblog%2Fwp-json%2Fwp%2Fv2%2Fposts%2F366\" title=\"Linkedin\" rel=\"nofollow noopener\" target=\"_blank\" style=\"font-size:32px!important;box-shadow:none;display:inline-block;vertical-align:middle\"><span class=\"heateor_sss_svg heateor_sss_s__default heateor_sss_s_linkedin\" style=\"background-color:#0077b5;width:40px;height:40px;margin:0;display:inline-block;opacity:1;float:left;font-size:32px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box\"><svg style=\"display:block;\" focusable=\"false\" aria-hidden=\"true\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"100%\" height=\"100%\" viewBox=\"0 0 32 32\"><path d=\"M6.227 12.61h4.19v13.48h-4.19V12.61zm2.095-6.7a2.43 2.43 0 0 1 0 4.86c-1.344 0-2.428-1.09-2.428-2.43s1.084-2.43 2.428-2.43m4.72 6.7h4.02v1.84h.058c.56-1.058 1.927-2.176 3.965-2.176 4.238 0 5.02 2.792 5.02 6.42v7.395h-4.183v-6.56c0-1.564-.03-3.574-2.178-3.574-2.18 0-2.514 1.7-2.514 3.46v6.668h-4.187V12.61z\" fill=\"#fff\"><\/path><\/svg><\/span><\/a><a aria-label=\"Pinterest\" class=\"heateor_sss_button_pinterest\" href=\"https:\/\/www.chandansharma.co.in\/blog\/wp-json\/wp\/v2\/posts\/366\" onclick=\"event.preventDefault();javascript:void( (function() {var e=document.createElement('script' );e.setAttribute('type','text\/javascript' );e.setAttribute('charset','UTF-8' );e.setAttribute('src','\/\/assets.pinterest.com\/js\/pinmarklet.js?r='+Math.random()*99999999);document.body.appendChild(e)})());\" title=\"Pinterest\" rel=\"nofollow noopener\" style=\"font-size:32px!important;box-shadow:none;display:inline-block;vertical-align:middle\"><span class=\"heateor_sss_svg heateor_sss_s__default heateor_sss_s_pinterest\" style=\"background-color:#cc2329;width:40px;height:40px;margin:0;display:inline-block;opacity:1;float:left;font-size:32px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box\"><svg style=\"display:block;\" focusable=\"false\" aria-hidden=\"true\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"100%\" height=\"100%\" viewBox=\"-2 -2 35 35\"><path fill=\"#fff\" d=\"M16.539 4.5c-6.277 0-9.442 4.5-9.442 8.253 0 2.272.86 4.293 2.705 5.046.303.125.574.005.662-.33.061-.231.205-.816.27-1.06.088-.331.053-.447-.191-.736-.532-.627-.873-1.439-.873-2.591 0-3.338 2.498-6.327 6.505-6.327 3.548 0 5.497 2.168 5.497 5.062 0 3.81-1.686 7.025-4.188 7.025-1.382 0-2.416-1.142-2.085-2.545.397-1.674 1.166-3.48 1.166-4.689 0-1.081-.581-1.983-1.782-1.983-1.413 0-2.548 1.462-2.548 3.419 0 1.247.421 2.091.421 2.091l-1.699 7.199c-.505 2.137-.076 4.755-.039 5.019.021.158.223.196.314.077.13-.17 1.813-2.247 2.384-4.324.162-.587.929-3.631.929-3.631.46.876 1.801 1.646 3.227 1.646 4.247 0 7.128-3.871 7.128-9.053.003-3.918-3.317-7.568-8.361-7.568z\"\/><\/svg><\/span><\/a><a aria-label=\"Whatsapp\" class=\"heateor_sss_whatsapp\" href=\"https:\/\/api.whatsapp.com\/send?text=Logic%20Bytes%20-%20Spread%20Your%20Knowledge https%3A%2F%2Fwww.chandansharma.co.in%2Fblog%2Fwp-json%2Fwp%2Fv2%2Fposts%2F366\" title=\"Whatsapp\" rel=\"nofollow noopener\" target=\"_blank\" style=\"font-size:32px!important;box-shadow:none;display:inline-block;vertical-align:middle\"><span class=\"heateor_sss_svg\" style=\"background-color:#55eb4c;width:40px;height:40px;margin:0;display:inline-block;opacity:1;float:left;font-size:32px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box\"><svg style=\"display:block;\" focusable=\"false\" aria-hidden=\"true\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"100%\" height=\"100%\" viewBox=\"-6 -5 40 40\"><path class=\"heateor_sss_svg_stroke heateor_sss_no_fill\" stroke=\"#fff\" stroke-width=\"2\" fill=\"none\" d=\"M 11.579798566743314 24.396926207859085 A 10 10 0 1 0 6.808479557110079 20.73576436351046\"><\/path><path d=\"M 7 19 l -1 6 l 6 -1\" class=\"heateor_sss_no_fill heateor_sss_svg_stroke\" stroke=\"#fff\" stroke-width=\"2\" fill=\"none\"><\/path><path d=\"M 10 10 q -1 8 8 11 c 5 -1 0 -6 -1 -3 q -4 -3 -5 -5 c 4 -2 -1 -5 -1 -4\" fill=\"#fff\"><\/path><\/svg><\/span><\/a><\/div><div class=\"heateorSssClear\"><\/div><\/div>","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false}}},"categories":[113,10,15,14,219,9],"tags":[218,220,221],"jetpack_publicize_connections":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.8 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>pagination with scroll using ajax - Logic Bytes<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.chandansharma.co.in\/blog\/pagination-with-scroll-using-ajax\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"pagination with scroll using ajax - Logic Bytes\" \/>\n<meta property=\"og:description\" content=\"HTML PAGE IS HERE: IN CODEIGNITER:: &lt;!DOCTYPE html&gt; &lt;html lang=&quot;en&quot;&gt; &lt;head&gt; &lt;meta charset=&quot;utf-8&quot;&gt; &lt;title&gt;Show More Testing&lt;\/title&gt; &lt;style type=&quot;text\/css&quot;&gt; ::selection{ background-color: #E13300; color: white; } ::moz-selection{ &hellip;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.chandansharma.co.in\/blog\/pagination-with-scroll-using-ajax\/\" \/>\n<meta property=\"og:site_name\" content=\"Logic Bytes\" \/>\n<meta property=\"article:published_time\" content=\"2016-08-19T19:12:19+00:00\" \/>\n<meta name=\"author\" content=\"Chandan Sharma\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Chandan Sharma\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.chandansharma.co.in\/blog\/pagination-with-scroll-using-ajax\/\",\"url\":\"https:\/\/www.chandansharma.co.in\/blog\/pagination-with-scroll-using-ajax\/\",\"name\":\"pagination with scroll using ajax - Logic Bytes\",\"isPartOf\":{\"@id\":\"https:\/\/www.chandansharma.co.in\/blog\/#website\"},\"datePublished\":\"2016-08-19T19:12:19+00:00\",\"dateModified\":\"2016-08-19T19:12:19+00:00\",\"author\":{\"@id\":\"https:\/\/www.chandansharma.co.in\/blog\/#\/schema\/person\/0c7e3da957c6e1375f6b4c899d491b49\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.chandansharma.co.in\/blog\/pagination-with-scroll-using-ajax\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.chandansharma.co.in\/blog\/pagination-with-scroll-using-ajax\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.chandansharma.co.in\/blog\/pagination-with-scroll-using-ajax\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.chandansharma.co.in\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"pagination with scroll using ajax\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.chandansharma.co.in\/blog\/#website\",\"url\":\"https:\/\/www.chandansharma.co.in\/blog\/\",\"name\":\"Logic Bytes\",\"description\":\"Spread Your Knowledge\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.chandansharma.co.in\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.chandansharma.co.in\/blog\/#\/schema\/person\/0c7e3da957c6e1375f6b4c899d491b49\",\"name\":\"Chandan Sharma\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.chandansharma.co.in\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/42af2b8ad482f08d8902257fec963abc?s=96&d=identicon&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/42af2b8ad482f08d8902257fec963abc?s=96&d=identicon&r=g\",\"caption\":\"Chandan Sharma\"},\"url\":\"https:\/\/www.chandansharma.co.in\/blog\/author\/chandan\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"pagination with scroll using ajax - Logic Bytes","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.chandansharma.co.in\/blog\/pagination-with-scroll-using-ajax\/","og_locale":"en_US","og_type":"article","og_title":"pagination with scroll using ajax - Logic Bytes","og_description":"HTML PAGE IS HERE: IN CODEIGNITER:: &lt;!DOCTYPE html&gt; &lt;html lang=\"en\"&gt; &lt;head&gt; &lt;meta charset=\"utf-8\"&gt; &lt;title&gt;Show More Testing&lt;\/title&gt; &lt;style type=\"text\/css\"&gt; ::selection{ background-color: #E13300; color: white; } ::moz-selection{ &hellip;","og_url":"https:\/\/www.chandansharma.co.in\/blog\/pagination-with-scroll-using-ajax\/","og_site_name":"Logic Bytes","article_published_time":"2016-08-19T19:12:19+00:00","author":"Chandan Sharma","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Chandan Sharma","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.chandansharma.co.in\/blog\/pagination-with-scroll-using-ajax\/","url":"https:\/\/www.chandansharma.co.in\/blog\/pagination-with-scroll-using-ajax\/","name":"pagination with scroll using ajax - Logic Bytes","isPartOf":{"@id":"https:\/\/www.chandansharma.co.in\/blog\/#website"},"datePublished":"2016-08-19T19:12:19+00:00","dateModified":"2016-08-19T19:12:19+00:00","author":{"@id":"https:\/\/www.chandansharma.co.in\/blog\/#\/schema\/person\/0c7e3da957c6e1375f6b4c899d491b49"},"breadcrumb":{"@id":"https:\/\/www.chandansharma.co.in\/blog\/pagination-with-scroll-using-ajax\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.chandansharma.co.in\/blog\/pagination-with-scroll-using-ajax\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.chandansharma.co.in\/blog\/pagination-with-scroll-using-ajax\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.chandansharma.co.in\/blog\/"},{"@type":"ListItem","position":2,"name":"pagination with scroll using ajax"}]},{"@type":"WebSite","@id":"https:\/\/www.chandansharma.co.in\/blog\/#website","url":"https:\/\/www.chandansharma.co.in\/blog\/","name":"Logic Bytes","description":"Spread Your Knowledge","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.chandansharma.co.in\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.chandansharma.co.in\/blog\/#\/schema\/person\/0c7e3da957c6e1375f6b4c899d491b49","name":"Chandan Sharma","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.chandansharma.co.in\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/42af2b8ad482f08d8902257fec963abc?s=96&d=identicon&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/42af2b8ad482f08d8902257fec963abc?s=96&d=identicon&r=g","caption":"Chandan Sharma"},"url":"https:\/\/www.chandansharma.co.in\/blog\/author\/chandan\/"}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/pajmea-5U","_links":{"self":[{"href":"https:\/\/www.chandansharma.co.in\/blog\/wp-json\/wp\/v2\/posts\/366"}],"collection":[{"href":"https:\/\/www.chandansharma.co.in\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.chandansharma.co.in\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.chandansharma.co.in\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.chandansharma.co.in\/blog\/wp-json\/wp\/v2\/comments?post=366"}],"version-history":[{"count":0,"href":"https:\/\/www.chandansharma.co.in\/blog\/wp-json\/wp\/v2\/posts\/366\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.chandansharma.co.in\/blog\/wp-json\/wp\/v2\/media?parent=366"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.chandansharma.co.in\/blog\/wp-json\/wp\/v2\/categories?post=366"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.chandansharma.co.in\/blog\/wp-json\/wp\/v2\/tags?post=366"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}