我已经转移到SSL,现在我的弹出菜单不起作用

时间:2021-01-22 02:23:44

I've moved to an SSL and now my popup menu on the nav doesn't work. It did work before hand. I can't see why it's not working. I didn't do anything to the CSS or javascript code.

我已经转移到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>

Is there a good tokenizer for javascript/css/html?

javascript / css / html是否有一个好的标记器?

2 个解决方案

#1


0  

The best practice is adding a redirect from http to https (web server will redirect all clients requests to https, if we forget change protocol in your app configuration):

最佳做法是从http添加重定向到https(如果我们忘记了应用配置中的更改协议,Web服务器会将所有客户端请求重定向到https):

Apache exemple:

<VirtualHost *:80>
    ServerName www.example.com
    Redirect "/" "https://www.example.com/"
</VirtualHost >

<VirtualHost *:443>
    ServerName www.example.com
    # ... SSL configuration goes here
</VirtualHost >

nginx exemple:

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;
  }
}

#2


0  

This is mostly a cashing issue, or URL-rewrite issue. If you are using a framework such as WordPress then this is a URL issue, since the links are stored in database, all you need to do is change main URL to be with https.

这主要是兑现问题或URL重写问题。如果您使用的是WordPress等框架,那么这是一个URL问题,因为链接存储在数据库中,您只需将主URL更改为https。

If not, then you got a caching issue, just purge cache and refresh your page.

如果没有,那么你有一个缓存问题,只需清除缓存并刷新页面。

Please note that if you purchase an CDN with your SSL that you disable the auto-minify option.0

请注意,如果您购买带有SSL的CDN,则禁用自动缩小选项

#1


0  

The best practice is adding a redirect from http to https (web server will redirect all clients requests to https, if we forget change protocol in your app configuration):

最佳做法是从http添加重定向到https(如果我们忘记了应用配置中的更改协议,Web服务器会将所有客户端请求重定向到https):

Apache exemple:

<VirtualHost *:80>
    ServerName www.example.com
    Redirect "/" "https://www.example.com/"
</VirtualHost >

<VirtualHost *:443>
    ServerName www.example.com
    # ... SSL configuration goes here
</VirtualHost >

nginx exemple:

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;
  }
}

#2


0  

This is mostly a cashing issue, or URL-rewrite issue. If you are using a framework such as WordPress then this is a URL issue, since the links are stored in database, all you need to do is change main URL to be with https.

这主要是兑现问题或URL重写问题。如果您使用的是WordPress等框架,那么这是一个URL问题,因为链接存储在数据库中,您只需将主URL更改为https。

If not, then you got a caching issue, just purge cache and refresh your page.

如果没有,那么你有一个缓存问题,只需清除缓存并刷新页面。

Please note that if you purchase an CDN with your SSL that you disable the auto-minify option.0

请注意,如果您购买带有SSL的CDN,则禁用自动缩小选项