Help with a navigation bar.

Help with a navigation bar.

Hi.  This might of been asked but I couldn't find it.  I'm new to web design.  I have a navigation bar that's horizontal on large screens and when the screen size gets smaller, it changes to just say Menu and it adds a button with three horizontal bars that the user can click.  When they click, the menu links are supposed to come out from the side.   I'm having trouble with that part though.  I'm using jQuery and don't know what's wrong here.   The menu comes out when the user clicks or hovers, like I want, but when they click or hover over it to make the menu go away, it starts going away normal and then the text for the longer menu's gets pushed down to a new line.   For example, I might have a menu like this:

One
Two
Really Long Text
Three
Four

And when they click the three bar button, it'll come out normal, but when they click to make it disappear, it goes away but in the process, it changes to this:

One
Two
Really
Long
Text
Three
Four

I believe this is because of my jQuery code and was hoping someone could help me fix this.   I've tried everything but because I've followed a tutorial on how to make this nav bar, I don't really understand all of it, only what they've explained.   Any help would greatly be appreciated.   If you need more of my code, just let me know.  Thank you.

  1.                 $(function() {
  2.                         var pull                = $('#pull');
  3.                         var menu                = $('nav ul');
  4.                         var menuWidth           = menu.width();

  5.                         $(pull).on('mouseover click', function(e) {
  6.                                 e.preventDefault();
  7.                                 menu.animate ({ width: "toggle"});
  8.                         });

  9.                         $(window).resize(function(){
  10.                                 var w = $(window).width();
  11.                                 if(w >= 840 && menu.is(':hidden')) {
  12.                                         menu.removeAttr('style');
  13.                                 }
  14.                         });

  15.                 });

  16. If I change the width: "toggle" to something like positon: "toggle"  there isn't that nice transition.   Please help!   Thanks!