<分区>
我正在开发产品目录页面。每个产品都有一个带有 id 的特定 div
元素。例如:
<div id="2354234" class="product">Here is name, image and description of the product</div>
<div id="2354235" class="product">Here is name, image and description of the product</div>
<div id="2354236" class="product">Here is name, image and description of the product</div>
<div id="2354237" class="product">Here is name, image and description of the product</div>
<div id="2354238" class="product">Here is name, image and description of the product</div>
<div id="2354239" class="product">Here is name, image and description of the product</div>
<div id="2354240" class="product">Here is name, image and description of the product</div>
<div id="2354241" class="product">Here is name, image and description of the product</div>
<div id="2354242" class="product">Here is name, image and description of the product</div>
<div id="2354243" class="product">Here is name, image and description of the product</div>
并且这些产品都加载了从 MySQL 数据库获取的 PHP。在页面的末尾我有分页。每页仅显示 10 个产品。所有产品都是 300,所以我有 30 页,每页 10 个产品。
当用户实时单击按钮而不重新加载以隐藏除 6 之外的所有其他元素(例如具有特定 ID)时,我如何使页面更新。
你能给我一些建议吗?我可以很好地使用 jQuery 和 PHP,所以我需要一个如何完成这件事的建议。
提前致谢!