1
4

4 に答える 4

1

このコードをテストできますか。

$( document ).ready(function() {
  var submenu = $("#sub-menu"),
      activeSlide = $("#active"),
      startPos = activeSlide.position().left;


  $("#parent").hover(
    function() {
      submenu.stop(true, true).slideDown( 600);
    },
     function() {
      submenu.stop(true, true).slideUp( 600);
    });

  $(".nav > li").mouseenter(function() {
    var nextPos = $(this).position().left + startPos;

    activeSlide.stop().animate({left: nextPos}, 250);
  });

   $(".nav").mouseleave(function() {

    activeSlide.stop().animate({left: startPos}, 250);
  });

});// end ready
于 2013-08-27T04:54:37.293 に答える