php+jQuery implements news tag classification and refresh-free paging_PHP tutorial
WBOY
Release: 2016-07-21 14:55:04
Original
874 people have browsed it
Nowadays, jquery is used more and more widely, and the effect of tag classification + non-refresh paging has been implemented in the news section of many websites.
I also tried to write one myself, and the rendering is as follows (the style can be customized according to user needs):
The implementation process will be introduced in detail below:
I have always tried to solve the problem by seeing the tricks. Three things need to be used here - tab effect plug-in and paging plug-in, and jquery's getJson request.
So I used the jquery-ui plug-in and jquery-page plug-in. Please click on the file name below to download.
"; //This is the number of news reads, it is not recommended to read too much $num=40 ; //The total number of news pages is rounded $num_string=ceil($num/$count);
//The data in JSON format is returned here in the form of key-value pairs, 0 is the total number of news pages, 1 is the spliced HTML news page $arr=array("0"=>$num_string, "1"=>$html_string); $jarr=json_encode($arr ); echo $jarr;
http://www.bkjia.com/PHPjc/364463.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/364463.htmlTechArticleNow jquery is more and more widely used, and tag classification + no refresh has been implemented in the news section of many websites Pagination effect. I also tried to write one myself, and the effect is as follows (like...
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn