This is a simplistic version of what I'm trying to do, but when you click on the link it redirects the page to the url + #, this is creating an additional navigation step when attempting to use the browser back button.
If I remove the href it doesn't work, if I change it to href='' then it refreshes the page every single time.
What is the proper way to handle this? I'm still attempting to learn jQuery / AJAX, so this may be a very basic question.
HTML
<div id='updateMe'>Old Value</div>
<a href='#' id='test'>Test</a>
jQuery
$(function(){
$('#test').click(function(){
$.ajax({
type: "GET",
url: '',
success: function(data) {
$('#updateMe').html('New Value');
}
});
return false;
});
});