Suppose this is your HTML for reference:
<a href="#something" id="some_id">Some link goes somewhere...</a>
If you are using jQuery , try like this:
$(document).ready(function() { $('a#some_id').click(function(e) { e.preventDefault(); return false; }); });
Demo at: http://jsfiddle.net/V7thw/
If you are not using jQuery drugs, try this pure JavaScript DOM :
window.onload = function() { if(document.readyState === 'complete') { document.getElementById('some_id').onclick = function(e) { e.preventDefault(); return false; }; } };
user1386320
source share