I have the following code:
<script type="text/javascript">
$(document).ready(function()
{
$("#thang").load("http://www.yahoo.com");
$(".SmoothLink").click( function()
{
$("#thang").fadeOut();
$("#thang").load($(this).attr("href"));
$("#thang").fadeIn();
});
});
</script>
<a href="http://www.google.com" id="thelink" class="SmoothLink">click here</a><br /><br />
<div style="border: 1px solid blue;" id="thang">
</div>
What I am trying to achieve is a quick and easy way to ajax-ify a website by simply putting a class on certain links that I want to load up into a div. The problem I am having is that the normal anchor action is being triggered and just redirecting to the link href normally. How do I suppress the normal anchor action?