Refresh particular div by jQuery

First we will make a customize function called getRefresh() -

function getRefresh(){
$(”#auto”).load(”data.php”, ”, callback);
}

Here we have used load( url, [data], [callback] ) ajax api. This api load HTML output from a remote file (data.php) and inject it into the div (auto). Below we have created a callback function named callback() -

function callback(){
setTimeout(”getRefresh()”, 1000);
}

setTimeout() function is [...]

A simple trick to apply alternate css class part 1

In our professional work sometimes we need to apply some simple trick to overcome complexity when retrieving data from database and showing those on user interface using loop.
Suppose that we have some data from database and showing them using loop on our interface like below -
First one we have designed static so that we [...]

How to check dynamic group checkbox?

Suppose that I have an admin panel and there have a content management system. And contents are belong to categories. Each category may have lots of contents and I want to delete the contents of each category separately. To make it possible first we will make an interface so that anybody can understand what [...]