Q:

Nav bar reappears after calling .remove()

When I call the .remove() function with .click, the navbar and button disappear but then reappear a couple seconds later.   Although running the remove() function from console removes the nav bar and it doesn't reappear.   Right after I click the button to call the remove, the network tab shows a 200 status from initiator turbolinks.js?body=1:59. 
$('#slide_up_btn').click(function() {
      $('#dispatch_nav').remove();
      $(this).slideUp();
});

<%= link_to '<i class="fa fa-arrow-up"></i>'.html_safe, "#", class: "btn btn-mini", id: "slide_up_btn" %>

<div class="navbar navbar-fixed-top uv" id="dispatch_nav"> ... </div>

Any help to the cause or solution would be appreciated! 

A:

$('#slide_up_btn').click(function(e) {
      e.preventDefault(); // prevent the default action
      $('#dispatch_nav').remove();
      $(this).slideUp();
});

Do that since #slide_up_btn is an anchor tag

