我已经转移到了SSL,现在导航栏上的弹出菜单无效。它事先确实有效。我不明白为什么它不起作用。我没有对CSS或javascript代码做任何事情。
$(document).ready(function(){
// Mobile menu toggle
$('.fa-reorder').click(function(){
$('body>nav ul').slideToggle();
});
//Checkboxes customization
$(':checkbox').click(function(e){
if ($(this).is(':checked')) $(this).addClass('checked');
else $(this).removeClass('checked');
});
//landing page popups
$('#signup').click(function(){
$('#signup-popup, #cover').show();
$('#cover, .fa-times').click(function(){
$('#cover, #signup-popup').hide();
});
});
$('#login').click(function(){
$('#login-popup, #cover').show();
$('#cover, .fa-times').click(function(){
$('#cover, #login-popup').hide();
});
});
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<nav>
<i class="fa fa-reorder"></i>
<ul>
<li><a href="https://www.serviceposts.com">HOME</a></li>
<li><a href="https://www.serviceposts.com/site/postings">POSTS</a></li>
<li><a href="https://www.serviceposts.com/site/about/hspw.php">HOW IT WORKS</a></li>
<li><a href="https://www.serviceposts.com/site/about">ABOUT</a></li>
<li><a href="https://www.serviceposts.com/site/about/emailcsb.php">CONTACT</a></li>
</ul>
<div class="buttons">
<input type="button" class="button green" value="SIGN UP" id="signup">
<input type="button" class="button" value="LOGIN" id="login">
</div>
<div id="signup-popup">
<h3>LET'S GET STARTED <i class="fa fa-times"></i></h3>
<div class="part">
<figure>
<a href="https://www.serviceposts.com/site/management/cust_reg.php"><img src="images/SP_Signup_03.png" alt=""/></a>
</figure>
<input type="button" class="button green" value="I am a Consumer">
<p><a href="https://www.serviceposts.com/site/management/cust_reg.php" class="blue">Make My Service Match Today</a></p>
</div>
<div class="part">
<figure>
<a href="https://www.serviceposts.com/site/management/bus_reg.php"><img src="images/SP_Signup_05.png" alt=""/></a>
</figure>
<a href="https://www.serviceposts.com/site/management/bus_reg.php"><input type="button" class="button orange" value="I am a Service Provider"></a>
<p><a href="https://www.serviceposts.com/site/management/bus_reg.php" class="blue">Make My Service Match Today</a></p>
</div>
</div>
<div id="login-popup">
<h3>LOGIN<i class="fa fa-times"></i></h3>
<form action="https://www.serviceposts.com/site/welcome.php" method="post">
<label for="username1">Username</label>
<input type="text" id="username1" name="uname"/>
<label for="password1">Password</label>
<input type="password" id="password1" name="txtpassword"/>
<input type="submit" class="button green" value="LOGIN"/>
</form>
<a href="#">Forgot username or password?</a>
</div>
</nav>
javascript / css / html是否有一个好的标记器?
答案 0 :(得分:0)
最佳做法是将http重定向添加到https(如果我们忘记了应用配置中的更改协议,网络服务器会将所有客户端请求重定向到https):
Apache例证:
<VirtualHost *:80>
ServerName www.example.com
Redirect "/" "https://www.example.com/"
</VirtualHost >
<VirtualHost *:443>
ServerName www.example.com
# ... SSL configuration goes here
</VirtualHost >
nginx例证:
server {
listen *:80;
server_name example.com;
proxy_set_header Host example.com;
location / {
rewrite ^(.*)$ https://example.com$1 permanent;
}
}
server {
listen *:443 ssl;
server_name example.com;
proxy_set_header Host example.com;
location / {
proxy_pass http://127.0.0.1:8080;
}
}
答案 1 :(得分:0)
这主要是兑现问题或网址重写问题。 如果您使用的是WordPress等框架,那么这是一个URL问题,因为链接存储在数据库中,您只需将主URL更改为https。
如果没有,那么您遇到了缓存问题,只需清除缓存并刷新页面。
请注意,如果您购买带有SSL的CDN,则禁用自动缩小选项。