I am trying to delay the link attrib so that it is applied after the content has faded out. But adding a timeout function does not work. Any ideas?
$(function () {
$(".layout a").click(function () {
setTimeout(function () { $("link:first").attr("href", $(this).attr('rel')); }, 500)
$.cookie("Layout", $(this).attr('name'), { expires: 365, path: '/media', secure: true });
$('.content, .searchresults').fadeOut(500).delay(500).fadeIn(275);
window.scrollTo(0, 0); // Scroll Window back to Top
return false;
});
});