Load more items when clicked show link using jquery

Loading more items using Jquery

When the page loads I am displaying 5 items Initially. When I clicked show link which is placed on the bottom, it will show next 5 items. When all the items are displayed, I have to hide the show link further.


Load more items when clicked show link using jquery


var itemsCount = 0;
 var itemsMax = 30;
 //var itemsMax = $("#totalcount").val();
 $('.product-section .item').hide();
function loadNextItems() {
 var pagination = 5;
 //var pagination = $("#initialcount").val(); 
 //var pagination = parseInt($("#initialcount").val()); 
 for (var i = itemsCount; i < (itemsCount + pagination) ; i++) { $('.product-section .item:eq(' + i + ')').show(); //load 5 more items in every iteration } itemsCount += pagination; if (itemsCount > itemsMax) {
//hiding load more link after loaded the maximum count
$('#showmore').on('click', function (e) {
/* end load more items*/

Continue Reading

Font color is not changing on Iphone for Numbers

This happens as IOS detects Phone Numbers and change to links that people can click to call them.

To overcome this issue, we can follow two approaches such as CSS fix and adding meta data fix.

Sample HTML

<div class="number">01202-529-414</div>

1) CSS based Fix

.number a,
.number a[href^=tel]{
   color: inherit; //or color code
   text-decoration: none;

2) Meta data based Fix

<meta name="format-detection" content="telephone=no" />

Continue Reading