1

私は基本的にhttp://www.building58.com/examples/tabSlideOut.htmlチュートリアルに従おうとしていましたが、そのエラーが発生しました。問題は何ですか?

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js" type="text/javascript"></script>

<script src="http://tab-slide-out.googlecode.com/files/jquery.tabSlideOut.v1.3.js"></script>
<style type="text/css" media="screen">  
    .slide-out-div {
     padding: 20px;
     width: 250px;
     background: #f2f2f2;
     border: #29216d 2px solid;
     }
     </style>
            <script>
         $(function(){
             $('.slide-out-div').tabSlideOut({
                 tabHandle: '.handle',                              //class of the element that will be your tab
                 pathToTabImage: 'images/contact_tab.gif',          //path to the image for the tab (optionaly can be set using css)
                 imageHeight: '122px',                               //height of tab image
                 imageWidth: '40px',                               //width of tab image    
                 tabLocation: 'left',                               //side of screen where tab lives, top, right, bottom, or left
                 speed: 300,                                        //speed of animation
                 action: 'click',                                   //options: 'click' or 'hover', action to trigger animation
                 topPos: '200px',                                   //position from the top
                 fixedPosition: false                               //options: true makes it stick(fixed position) on scroll
             });
         });



         </script>
        <div class="slide-out-div">
        <a class="handle" href="http://link-for-non-js-users.html">Content</a>
        <h3>Contact me</h3>
        <p>Thanks for checking out my jQuery plugin, I hope you find this useful.
        </p>
        <p>This can be a form to submit feedback, or contact info</p>
    </div>

[04:54:57.945] TypeError:$( "。slide-out-div")。tabSlideOutは関数ではありません@

4

2 に答える 2

3

ブラウザーにデバッガーがある場合、ほとんどの最新のデバッガーはF12を押してそれをチェックします。次に、すべてのスクリプトが正しくロードされているtypeofかどうかを確認し、関数を使用してtabSlideOutが何であるか(未定義または関数)をチェックできます。

ここからコピーして貼り付けたと思います:http ://www.building58.com/examples/tabSlideOut.html 。cssを含むすべてを正しくコピーしたかどうかを再確認できますか?

于 2012-09-13T11:14:25.553 に答える
0

使用してみてください

jQuery(function() {

});

$の代わりに

于 2012-09-13T11:07:04.497 に答える