开发者

Update to Easy Slider 1.7 made all my JQuery code stop working

开发者 https://www.devze.com 2022-12-16 05:42 出处:网络
I\'m pretty novice as a JQuery user goes. I\'ve got some experience implementing different plugins but would be lost trying to customize my own.

I'm pretty novice as a JQuery user goes. I've got some experience implementing different plugins but would be lost trying to customize my own.

I can't share the exact site details with you due to a NDA开发者_C百科, so I hope someone can give me a little help. I've got a project due today (Just HTML/CSS/JQuery).

It has a lightbox, show/hide login menu and a slider is Easy Slider 1.5. Everything was working together, until I attempted to update to Easy Slider 1.7 (see link on same page, I'm too new to post more than 1 link). When I did so, JQuery stopped working for all the plugins. I've attempted to revert back to the original state, by undoing my work (didn't do much), ad JQuery remains broken.

Firebug Error Console shared no errors. I can't find anything in the code no matter how hard I look at it.

Can anyone help me troubleshoot this JQuery problem? Delivery is supposed to be tonight for the project.

EDIT: Generic header info:

<!-- Global Style Sheet -->

<link rel="stylesheet" href="style.css" media="screen" type="text/css" />

<!-- Cufon -->

<script src="cufon/cufon.js" type="text/javascript"></script>
<script src="cufon/gotham_325-gotham_350.font.js" type="text/javascript"></script>

<!-- jQuery Javascript -->

<script type="text/javascript" language="javascript" src="js/jquery-1.3.2.min.js"></script>
<script type="text/javascript" language="javascript" src="js/jquery-ui-1.7.1.custom.min.js"></script>
<script type="text/javascript" language="javascript" src="js/jquery.colorbox.js"></script>
<script type="text/javascript" language="javascript" src="js/global.js"></script>
<script type="text/javascript" language="javascript" src="js/home.js"></script>
<script type="text/javascript">
        $(document).ready(function() {

            $(".signin").click(function(e) {          
                e.preventDefault();
                $("fieldset#signin_menu").toggle();
                $(".signin").toggleClass("menu-open");
            });

            $("fieldset#signin_menu").mouseup(function() {
                return false
            });
            $(document).mouseup(function(e) {
                if($(e.target).parent("a.signin").length==0) {
                    $(".signin").removeClass("menu-open");
                    $("fieldset#signin_menu").hide();
                }
            });         

        });
</script>
<script src="javascripts/jquery.tipsy.js" type="text/javascript"></script>
<script type='text/javascript'>
    $(function() {
      $('#forgot_username_link').tipsy({gravity: 'w'});   
    });
  </script>
<script type="text/javascript" language="javascript" src="js/easySlider1.5.js"></script>
<script type="text/javascript">
$(document).ready(function(){   
    $("#slider").easySlider();
}); 
</script>
<script type="text/javascript">
            $(document).ready(function(){
                $(".regbox").colorbox({iframe:true, innerWidth:270, innerHeight:270});
            });
        </script>


Most probable cause for your issue is that there's an exception thrown by a piece of script either before jQuery is loaded or before $(document).ready() call is made.

Start from the following code and include pieces of yours one by one until you locate the offending one:

<!-- jQuery Javascript -->
<script type="text/javascript" language="javascript" src="js/jquery-1.3.2.min.js"></script>
<script type="text/javascript" language="javascript" src="js/jquery-ui-1.7.1.custom.min.js"></script>
        $(document).ready(function() {
            window.alert("jQuery works!");          
        });
</script>

Side note: why do you have two separate functions attached to $(document).ready()?

0

精彩评论

暂无评论...
验证码 换一张
取 消