www.webdeveloper.com
Results 1 to 2 of 2

Thread: jQuery slidetoggle jumps in Internet Explorer

  1. #1
    Join Date
    May 2013
    Posts
    2

    jQuery slidetoggle jumps in Internet Explorer

    'm on the home stretch of developing my personal website and unsurprisingly IE throws a spanner in the works! I have a Slidetoggle feature that works on all browsers except IE - Where once you click on the toggle link, the browser jumps to the top of the page instead of revealing the sliding section.

    If I try to change the anchor tag to a different tag, nothing happens at all! No slide, no jump absolutely nothing!

    Heres the JS:

    Code:
    $(document).ready(function() {
    $('body').addClass('js');
    var $menu = $('#menu'),
    $menulink = $('.menu-link');
    
    $menulink.click(function() {
    $menulink.toggleClass('active');
    $menu.toggleClass('active');
    return false;
    });
    });
    The markup looks fine and so does the CSS so not sure why IE is behaving like this. Help!!

    Heres the URL to my website: http://www.rummanamin.com

  2. #2
    Join Date
    May 2013
    Posts
    2
    Here is the right JS, Posted wrong section above:

    $(document).ready(function() {
    $(".portfolio").hide();

    $(window).load(function() {

    $(".show").click(function(){
    event.preventDefault();
    $(".portfolio").slideToggle(400);
    $('html, body').animate({
    scrollTop: $(".portfolio").offset().top
    }, 600);
    });

    });

    });

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles