使用带有3个脚本的jquery时出错

时间:2012-02-22 07:38:10

标签: jquery

我有一个示例代码:

....code html....
    <script>
    $(document).ready(function(){
        jQuery.runCart('C');
    });
    </script>
    <script type="text/javascript">
    $(document).ready(function(){
        jQuery.ajaxRequest('/index.php?dispatch=statistics.collect', {
            method: 'post',
            data: {
                've[url]': location.href,
                've[title]': document.title,
                've[browser_version]': jQuery.ua.version,
                've[browser]': jQuery.ua.browser,
                've[os]': jQuery.ua.os,
                've[client_language]': jQuery.ua.language,
                've[referrer]': document.referrer,
                've[screen_x]': (screen.width || null),
                've[screen_y]': (screen.height || null),
                've[color]': (screen.colorDepth || screen.pixelDepth || null),
                've[time_begin]': 1329885634.0486
            },
            hidden: true
        });
    });
    </script>
    <script>
        $(document).ready(function($) { 
                    $(".reset").click(function() {
                        $("form#form_search_advance").show();
                        $(".success").hide();
                    });
                });
        </script>
...code html...

运行代码时,我在firebug中看到错误,错误为“jQuery.runCart is not a function”,“jQuery.ua is undefined

0 个答案:

没有答案