• Resolved Anna

    (@swoonlife)


    Hello! I’m new at this and could use some help. I just added Javascript to create a sticky navigation menu (I followed a tutorial and it works!), but now my flex slider won’t show up. I tried changing it to a carousal slider, which shows up, but the images never load. I’m stuck with the ‘loading’ icon indefinitely. Yes, I’m editing a child theme. Here’s the code I posted (in a html widget):

    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
    
    <script type="text/javascript">
    
    $(document).ready(function() {
    
     //Calculate the height of <header>
    
     //Use outerHeight() instead of height() if have padding
    
        var aboveHeight = $('header').outerHeight();
    
     // when scroll
    
        $(window).scroll(function(){
    
      //if scrolled down more than the header's height
    
            if ($(window).scrollTop() > aboveHeight){
    
       // if yes, add "fixed" class to the <div class=".col-md-12.kad-header-right">
    
       // add padding top to the #content (value is same as the height of the .col-md-12.kad-header-right)
    
                $('.col-md-12.kad-header-right').addClass('fixed').css('top','0').next().css('padding-top','60px');
    
            } else {
    
       // when scroll up or less than aboveHeight, remove the "fixed" class, and the padding-top
    
                $('.col-md-12.kad-header-right').removeClass('fixed').next().css('padding-top','0');
    
            }
    
        });
    
    });
    
    </script>

    Thanks!

Viewing 10 replies - 1 through 10 (of 10 total)
Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Jquery deleted my flexslider’ is closed to new replies.