index.html 9.7 KB
<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <link rel="stylesheet" href="http://at.alicdn.com/t/font_782635_cvxdd8r2ec.css"/>
    <link rel="stylesheet" href="css/index.css"/>
    <script src="js/base.js"></script>
    <title>首页</title>
    <style>

    </style>
</head>
<body>
<!--遮罩-->
<div class="wrap">
    <!--弹层-->
    <div class="popup">
        <div class="filterkind">
            <p class="filter_grade">年级</p>
            <div class="gradelist">
                <p class="select_grade">全部</p>
                <p class="select_grade">二年级</p>
                <p class="select_grade">三年级</p>
                <p class="select_grade">四年级</p>
                <p class="select_grade">五年级</p>
                <p class="select_grade">六年级</p>
                <p class="select_grade">七年级</p>
                <p class="select_grade">五年级</p>
                <p class="select_grade">六年级</p>
                <p class="select_grade">七年级</p>
                <p class="select_grade">五年级</p>
                <p class="select_grade">六年级</p>
                <p class="select_grade">七年级</p>
            </div>
        </div>

        <div class="filterkind">
            <p class="filter_science">学科</p>
            <div class="sciencelist">
                <p class="select_subject">全部</p>
                <p class="select_subject">数学</p>
                <p class="select_subject">英语</p>
                <p class="select_subject">历史</p>
                <p class="select_subject">地理</p>
                <p class="select_subject">政治</p>
                <p class="select_subject">物理</p>
                <p class="select_subject">化学</p>
                <p class="select_subject">数学</p>
                <p class="select_subject">英语</p>
                <p class="select_subject">历史</p>
                <p class="select_subject">地理</p>
                <p class="select_subject">政治</p>
            </div>
        </div>
        <div class="operation">
            <div class="repeat">
                <p class="iconfont icon-icon-test"></p>
                <p class="refresh">重置</p>
            </div>

            <div class="finish">
                <p class="iconfont icon-wanchengyunda"></p>
                <p class="finish_filter">完成</p>
            </div>
        </div>
    </div>

</div>
<div class="container">

    <div class="head">
        <div class="grade">
            <p class="all_grade filteractive">全部年级</p>
            <p class="iconfont icon-icon-arrDown-fill graderow filteractive"></p>

        </div>
        <p class="verticalline">|</p>
        <div class="subject">
            <p class="allsubject">全部学科</p>
            <p class="iconfont icon-icon-arrDown-fill subjectrow"></p>
        </div>
        <p class="verticalline">|</p>
        <div class="filter">
            <p class="chosefilter">筛选</p>
            <p class="iconfont icon-shaixuan allrow"></p>
        </div>
    </div>
    <div class="body_text">
        <div class="course_list">
            <p class="course_list_name">初一升初二物理暑假直播班</p>
            <div class="course_money">
                <p class="course_num">NO.123456</p>
                <p class="course_price">¥200</p>
            </div>
        </div>
        <div class="course_list">
            <p class="course_list_name">初一升初二物理暑假直播班</p>
            <div class="course_money">
                <p class="course_num">NO.123456</p>
                <p class="course_price">¥200</p>
            </div>
        </div>
        <div class="course_list">
            <p class="course_list_name">初一升初二物理暑假直播班</p>
            <div class="course_money">
                <p class="course_num">NO.123456</p>
                <p class="course_price">¥200</p>
            </div>
        </div>
        <div class="course_list">
            <p class="course_list_name">初一升初二物理暑假直播班</p>
            <div class="course_money">
                <p class="course_num">NO.123456</p>
                <p class="course_price">¥200</p>
            </div>
        </div>
        <div class="course_list">
            <p class="course_list_name">初一升初二物理暑假直播班</p>
            <div class="course_money">
                <p class="course_num">NO.123456</p>
                <p class="course_price">¥200</p>
            </div>
        </div>
        <div class="course_list">
            <p class="course_list_name">初一升初二物理暑假直播班</p>
            <div class="course_money">
                <p class="course_num">NO.123456</p>
                <p class="course_price">¥200</p>
            </div>
        </div>
        <div class="course_list">
            <p class="course_list_name">初一升初二物理暑假直播班</p>
            <div class="course_money">
                <p class="course_num">NO.123456</p>
                <p class="course_price">¥200</p>
            </div>
        </div>
        <div class="course_list">
            <p class="course_list_name">初一升初二物理暑假直播班</p>
            <div class="course_money">
                <p class="course_num">NO.123456</p>
                <p class="course_price">¥200</p>
            </div>
        </div>
        <div class="course_list">
            <p class="course_list_name">初一升初二物理暑假直播班</p>
            <div class="course_money">
                <p class="course_num">NO.123456</p>
                <p class="course_price">¥200</p>
            </div>
        </div>


    </div>

        <div class="footer">
            <div class="person_course">
                <p class="iconfont icon-085shucezhongxin"></p>
                <p class="course">课程</p>
            </div>
            <div class="person_mine">
                <p class="iconfont icon-06_huiyuanguanli"></p>
                <p class="mine">我的</p>
            </div>

        </div>
</div>
<script src="js/jquery.min.js" type="text/javascript" charset="utf-8"></script>
<script>
    //个人中心和课程筛选
    $(".person_course").click(function(){
        $(this).children(".icon-085shucezhongxin").css("color","#3990F5");
        $(this).children(".course").css("color","#3990F5");
        $(this).siblings(".person_mine").children(".icon-06_huiyuanguanli").css("color","#999999");
        $(this).siblings(".person_mine").children(".mine").css("color","#999999");
    })
    $(".person_mine").click(function(){
        $(this).children(".icon-06_huiyuanguanli").css("color","#3990F5");
        $(this).children(".mine").css("color","#3990F5");
        $(this).siblings(".person_course").children(".icon-085shucezhongxin").css("color","#999999");
        $(this).siblings(".person_course").children(".course").css("color","#999999");
        window.location.href='personcenter.html'

    })
    //进入课程详情页
    $(".course_list").click(function(){
        window.location.href='introducecourse.html'
    })
    //筛选年级
    $(".grade").click(function(){
        $(".select_grade").removeClass("grade_active");
        $(".select_subject").removeClass("subject_active");

        $(this).children(".all_grade").addClass("filteractive");
        $(this).children(".graderow").addClass("filteractive");
        $(this).children(".all_grade").addClass("filter_active");
        $(".allsubject").removeClass("filteractive");
        $(".subjectrow").removeClass("filteractive");
        $(".chosefilter").removeClass("filteractive");
        $(".allrow").removeClass("filteractive");
        $(".wrap").css("display","block");
        $("body").css("overflow","hidden")
    });
    //筛选学科
    $(".subject").click(function(){
        $(".select_grade").removeClass("grade_active");
        $(".select_subject").removeClass("subject_active");


        $(this).children(".allsubject").addClass("filteractive");
        $(this).children(".subjectrow").addClass("filteractive");
        $(".all_grade").removeClass("filteractive");
        $(".graderow").removeClass("filteractive");
        $(".chosefilter").removeClass("filteractive");
        $(".allrow").removeClass("filteractive");

        $(".wrap").css("display","block");
        $("body").css("overflow","hidden");
    })
//筛选全部
    $(".filter").click(function(){
        $(".select_grade").removeClass("grade_active");
        $(".select_subject").removeClass("subject_active");

        $(this).children(".chosefilter").addClass("filteractive");
        $(this).children(".allrow").addClass("filteractive");
        $(".all_grade").removeClass("filteractive");
        $(".graderow").removeClass("filteractive");
        $(".allsubject").removeClass("filteractive");
        $(".subjectrow").removeClass("filteractive");
        $(".wrap").css("display","block");
        $("body").css("overflow","hidden")
    })
    //隐藏wrapper
    $(".wrap").click(function(){
        $(this).css("display","none");
        $("body").css("overflow","scroll")
    })
    //选择年级
    $(".select_grade").click(function(){
        window.event.stopPropagation();
        $(this).addClass("grade_active");
        $(this).siblings(".select_grade").removeClass("grade_active")
    })
    // 选择学科
    $(".select_subject").click(function(){
        window.event.stopPropagation();
        $(this).addClass("subject_active");
        $(this).siblings(".select_subject").removeClass("subject_active");
    })
    //重置按钮
    $(".repeat").click(function(){
        window.event.stopPropagation();
        $(".select_grade").removeClass("grade_active");
        $(".select_subject").removeClass("subject_active");

    })
</script>
</body>
</html>