I want to redirect my page to an anchor of itself when an element with a certain class is clicked. This is what I thought would work:
$(function()
{
  $('.paginacion').click(function()
  {
    var $this = $(location).attr('href');
    $this += '#nav';
    $(location).attr('href', $this);
  });
});
However, I can see how the wanted location is produced in the URL, but a snap later it's gone and it doesn't go to the anchor. What's wrong? Note that I'm pretty dumb with javascrip and jQuery.
 
     
     
    