I’ve been asked to create a plugin similar to this one for a project at work except instead of sliding from the top it should slide in from the right of the page.
I’ve put a JSFiddle together of my code for something sliding down from the top which is here.
My approach to get the desired effect was to change the style for the divs from {top:0} to {right:0} and then I swapped all my height and width styles. I then changed the slideToggle() call to be an animate({width: 'toggle'}) call. However, as you can see from the next JSFiddle, it really hasn’t worked!. Here’s a JSFiddle of my attempt.
Any idea where I’m going wrong?
I found a great example from an old colleague of mine (@sohnee on here…) which slides in from the right and I tried copying the relevant styles from his plugin but it didn’t make a difference. As an example, his plugin can be found here.
Cheers,
James
Adding floats to tab and content seems to work but the tab sometimes jumps under the content. Maybe you could work from this? fiddle