문제

I'm trying to do a simple JQuery UI module that shows a menu from left to right with "drop" effect.

I'm using Jquery UI 1.10.3 and Jquery 2.0.3.

My problem: If menu comes from left the menu background jumps from bottom to top and viceversa.

This is my code, you can check my problem here: http://jsfiddle.net/yrhTS/

> First JavaScript function made an alternative to JQuery deprecated .toggle().

Thank you very much in advance!

도움이 되었습니까?

해결책

Add padding:2px; to your #articleleftmenu will solve your problem.

Check this JSFiddle

FYI:

There is a difference between .toggle() and .toggle() event

See documentation:

  1. .toggle()
  2. .toggle() event

So you use .toggle() normally as below.

$('.sections').on('click', function() {
           $( "#articleleftmenu" ).slideToggle( "left" );
}); 

Check this Updated JSFiddle.

Hope you understand.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top