我在这个论坛上尝试了12个不同的解决方案,其中没有解决方案.我希望我的所有域名都有https:// www.
现在我用这个:
RewriteEngine on
RewriteCond %{HTTPS} off
RewriteRule (.*) https://www.%{HTTP_HOST}%{REQUEST_URI}
Run Code Online (Sandbox Code Playgroud)
但现在当我访问www.example.com时,它会重定向到https://www.www.example.com (两次www.)
我想要做的是隐藏前12个元素并显示接下来的12个元素.
//this is dynamic loaded content
<div class="inner-content">
<div class="front-pro">1</div>
<div class="front-pro">2</div>
<div class="front-pro">3</div>
<div class="front-pro">4</div>
<div class="front-pro">5</div>
<div class="front-pro">6</div>
<div class="front-pro">7</div>
<div class="front-pro">8</div>
<div class="front-pro">9</div>
<div class="front-pro">10</div>
<div class="front-pro">11</div>
<div class="front-pro">12</div>
<div class="front-pro hidden">13</div>
<div class="front-pro hidden">14</div>
..... etc (200 divs more)
</div>
<div onclick="SearchNext();">next</div>
Run Code Online (Sandbox Code Playgroud)
这是我的javascript/jquery:
function SearchNext(){
var first = $('.inner-content').children('.front-pro:hidden:first');
first.prevAll(':lt(12)').hide();
first.nextAll(':lt(12)').show();
}
Run Code Online (Sandbox Code Playgroud)
它停止工作后有一次工作.(它跳过了13号)我希望每次下一次点击都能看到12个新元素并隐藏前一个元素.
更新 - 这是我最终的结果,完美的 JSFIDDLE DEMO
感谢Alex Char
用于创建页码的PHP,您也可以使用javascript执行此操作
//$counter is search results
$x = 1;
$Pnumbers = '';
while($x <= ceil($counter/12)) …Run Code Online (Sandbox Code Playgroud)