笙默考试管理系统-MyExamTest(4)

笙默考试管理系统-MyExamTest(4

目录

一、 笙默考试管理系统-MyExamTest

二、 笙默考试管理系统-MyExamTest

三、 笙默考试管理系统-MyExamTest

四、 笙默考试管理系统-MyExamTest

五、 笙默考试管理系统-MyExamTest

  • 笙默考试管理系统-MyExamTest

 ifShow:function(){

            if($win.scrollTop()>ops.scrollTop){

                $dom.show();

            }else{

                $dom.hide();

            }

        },

  • 笙默考试管理系统-MyExamTest

        setTop:function(){

            var t = this.getTop();

            var l = this.getLeft();

            if($.browser.msie&&$.browser.version==="6.0"){

                t = $doc.scrollTop()+t;

                if(t>$doc.height()){

                    t=$doc.height()-ops.bottom-$dom.outerWidth();

                }

  • 笙默考试管理系统-MyExamTest

                $dom.css({position:"absolute",top:t,left:l});

            }else{

                $dom.css("position","fixed");

                if($dom.css("left")!=l+"px"){

                    $dom.css("left",l);

                }

                if($dom.css("top")!=t+"px"){

                    $dom.css("top",t);

                }

  • 笙默考试管理系统-MyExamTest

            }

        },

        handler:function(){

         var self = this;

            if(ops.isBack){

                $dom.click(function(){

                    $doc.scrollTop(0);

                    if(ops.scrollTop>0){

                        $dom.hide();

                    }

  • 笙默考试管理系统-MyExamTest

                });

                self.ifShow();

            }else if(ops.goBack){

                $dom.click(function(){

                    history.go(-1);

                });

            }

            

            self.setTop();

            $win.scroll(function(){

                if($.browser.msie&&$.browser.version==="6.0"){

                    self.setTop();

                }

                if(ops.isBack){

                 self.ifShow();

                }

            });

            $win.resize(function(){

                self.setTop();

                if(ops.isBack){

                 self.ifShow();

                }

            });

        }

    };

    opr.handler();

    return $dom;

}})})(jQuery);

你可能感兴趣的:(笙默考试管理系统,javascript)