首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >菜单链接不工作-这里的超级编码newb

菜单链接不工作-这里的超级编码newb
EN

Stack Overflow用户
提问于 2016-06-17 07:16:17
回答 1查看 119关注 0票数 1

我的代码第59行我在菜单中放了一个图像链接到另一个页面,它所做的就是冻结页面,在我悬停在它上面的页面上,它会显示它到正确的位置,如果我在一个新的选项卡中右键单击并打开它,它就会转到那里,但是链接/图像本身不会。

http://www.7daygrind.com/js/jquery.min.js

代码语言:javascript
复制
<!DOCTYPE html>
<!--[if lt IE 7]>      <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]>         <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]>         <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
    <head>
        <meta charset="utf-8">
        <!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"><![endif]-->
        <title>7 day grind</title>
    	<meta name="keywords" content="" />
		<meta name="description" content="" />
<!-- 
Nature Theme 
http://www.templatemo.com/tm-398-nature
-->
        <meta name="viewport" content="width=device-width">
        
        <!-- Google Web Font Embed -->
        <link href='http://fonts.googleapis.com/css?family=Raleway:400,600,500,300,700' rel='stylesheet' type='text/css'>
        
        <link rel="stylesheet" href="css/bootstrap.min.css">
        <link rel="stylesheet" href="css/templatemo_main.css">
        <style type="text/css">
        biztitle1 {
	font-family: gabriola;
}
        .no-js body #main-wrapper .col-lg-12.col-md-12.col-sm-12.col-xs-12.affix.text-center .templatemo-site-title a {
	font-family: gabriola;
}
        .no-js body #main-wrapper .col-lg-12.col-md-12.col-sm-12.col-xs-12.affix.text-center .templatemo-site-title b {
	font-family: Mardian Demo;
}

        </style>
    </head>
    <body>
        <div id="main-wrapper">
            <!--[if lt IE 7]>
                <p class="chromeframe">You are using an <strong>outdated</strong> browser. Please <a rel="nofollow" href="http://browsehappy.com">upgrade your browser</a> or <a rel="nofollow" href="http://www.google.com/chromeframe/?redirect=true">activate Google Chrome Frame</a> to improve your experience.</p>
            <![endif]-->

          <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 affix text-center" style="z-index: 1;">
                <h1 class="templatemo-site-title">&nbsp;</h1>
                <h1 class="templatemo-site-title"><img src="images/btn-menu.png" alt="main menu" id="m-btn" class="pull-right visible-xs visible-sm" >
                </h1>

                <ul id="responsive" style="display:none" class="hidden-lg hidden-md"></ul><!-- /.responsive --></div>
          <div class="menu visible-md visible-lg">
              <ul id="menu-list">
                    <li class="active home-menu"><a href="#home">Home</a></li>
                                        <li class="services-menu"><a href="#services">Our Services</a></li>
                    <li class="services-menu1"><a href="#services1">- Integrated</a></li>
                    <li class="services-menu2"><a href="#services2">- Soul-Fit-Trition</a></li>
                <li class="services-menu3"><a href="#services3">- Boot-camp</a></li>
                    <li class="about-menu"><a href="#about">About Us</a></li>
                    <li class="store-menu"><a href="#store">Store</a></li>
                    <li class="testimonial-menu"><a href="#testimonial">Testimonials</a></li>
                    <li class="contact-menu"><a href="#contact">Contact</a></li>
                    <li class="blog-menu"><a href="http://blog.7daygrind.com" target="_parent"> <img src="images/blogbutton.jpg" width="100" height="50"></a></li>
            </ul>
    </div>
    <!-- /.menu -->
    <div class="image-section">
                <div class="image-container">
                    <img src="images/nature1.jpg" id="home-img" class="main-img inactive" alt="Home">
                    <img src="images/kettlebells.jpg" id="about-img" class="inactive" alt="About">
                    <img src="images/nature2.jpg" id="services-img"  class="inactive" alt="Services">
                     <img src="images/nature2.jpg" id="services1-img"  class="inactive" alt="Services1">
                      <img src="images/nature2.jpg" id="services2-img"  class="inactive" alt="Services2">
                       <img src="images/boot-camp2.jpg" id="services3-img"  class="inactive" alt="Services3">
                       <img src="images/nature1.jpg" id="store-img" class="inactive" alt="Store">
                    <img src="images/nature5bbb.jpg" id="testimonial-img" class="inactive" alt="Testimonial">
                    <img src="images/stretch.jpg" id="contact-img" class="inactive" alt="Contact">
                    
                  <img src="images/nature1.jpg" id="blog-img" class="inactive" alt="Blog">
      </div>
    </div>

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2016-06-17 07:40:21

UPDATED:JQuery在页面上阻塞a上的default函数。尝试这个重定向页面的点击。

代码语言:javascript
复制
<script>    
jQuery(document).ready(function(){

        $(".blog-menu a").click(function(){
            window.location='http://blog.7daygrind.com';
        });

    });
</script>
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/37875350

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档