这两节课内容在我本地能跑出效果,在线IDE就显示个0%,什么状况?
来源:3-2 静态页思路验证-组件切换
 
			AfterStories
2016-07-29
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8"/>
    <meta name="viewport" content="width=device-width, minimum-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="css/jquery.ui.css" type="text/css" />
    <title>慕课网2015课程学习情况</title>
    <style type="text/css">
        body{
            margin: 0;
            padding: 0;
        }
        .component{
            width: 50%;
            height: 50px;
            margin-bottom: 20px;
            background-color: #eee;
           
        }
    </style>
   <script type="text/javascript" src="../js/lib/jquery.js"></script>
    <script type="text/javascript" src="../js/lib/jquery-ui.min.js"></script>
    <script type="text/javascript" src="../js/lib/jquery.fullPage.js"></script>
</head>
    <body>
    <!-- 用于验证 fullpage.js 切换页面,以及内容组织结构可用,组件能够进行动画 -->
    <script type="text/javascript">
        $(function (){
            
        	$("#h5").fullpage({
        		
                "sectionsColor":["red","green","pink"],
        		onLeave:function(index,nextIndex,direction){
        			
        			$('#h5').find('.page').eq(index-1).trigger('onLeave');
        		},
        		afterLoad:function(anchorLink,index){
        			
        			$('#h5').find('.page').eq(index-1).trigger('onLoad');
        		}
        	});
        
        		$('.page').on('onLeave',function(){
        			console.log( $(this).attr('id'),'==>','onLeave');
        		})
        		$('.page').on('onLoad',function(){
        			console.log( $(this).attr('id'),'==>','onLoad');
        		})
        });
    </script>
    <div id="h5">
        <div class="page section" id="page-1">
        <div class="component log">logo</div>
         <div class="component slogan">s logan</div>
        
    </div>
    <div class="page section" id="page-2">
    <div class="component desc">desc</div>
   
    </div>
<div class="page section" id="page-3">
    <div class="component bar">bar</div>
    
    </div>
</div>
</body>
</html>
写回答
	2回答
- 
				  Lyn 2016-08-08 线上服务挂了?看不到代码了。。。stories.p.imooc.io 012016-10-30
- 
				  大头豆芽 2016-11-02 因为你输入网址默认打开的是根目录下的index.html文件哟,你可以在你自己的地址后面加绝对路径,例如"http://justdoit.p.imooc.io/test/test-valid.html" 00
相似问题
 
						