I am trying to use .fadeIn () to make my sharing of dynamic content more smooth. In addition, I get what I can only describe as double attenuation (inside and out and back).
I am new to JS and jQuery API, so any help is appreciated.
Demo page: http://robert-richter.com/boilerplate/
$('nav a').click(function(e) { e.preventDefault() var href = "inc/" + this.href.split('=').pop() + ".php" $('.con').hide().load(href).fadeIn; if (href == 'inc/blog.php') { document.title = 'Robert-Richter.com | Blog'; window.location.hash = 'index.php?content=blog'; } else if (href == 'inc/portfolio.php') { document.title = 'Robert-Richter.com | Portfolio'; window.location.hash = 'index.php?content=portfolio'; } else if (href == 'inc/lebenslauf.php') { document.title = 'Robert-Richter.com | Lebenslauf'; window.location.hash = 'index.php?content=lebenslauf'; } else if (href == 'inc/kontakt.php') { document.title = 'Robert-Richter.com | Kontakt'; window.location.hash = 'index.php?content=kontakt'; } else { document.title = 'Robert-Richter.com'; window.location.hash = ''; } return false; });
Also window.location.hash-thing adds # between the similar domain/boilerplate/#index.php?content=blog
source share