$(document).ready(function() {
if (window.location.href.indexOf('index.html') == -1) {
scrollToAbout();
} else {
var hasVisitedIndex = localStorage.getItem("has_visited_index");
if(!hasVisitedIndex) {
localStorage.setItem("has_visited_index","1");
} else {
scrollToAbout();
}
}
$("#dialog-message").hide();
$("#read-less-about-button").hide();
$("#read-more-about-text").hide();
$("#read-more-about-button").click(function() {
$("#read-more-about-text").slideDown();
$(this).hide();
$("#read-less-about-button").show();
});
$("#read-less-about-button").click(function() {
$('html, body').animate({
scrollTop: $(".about").offset().top
});
$("#read-more-about-text").slideUp();
$(this).hide();
$("#read-more-about-button").show();
});
// a hack to remove the input-error class from spans when they're clicked
$("span").click(function() {
$(this).removeClass("input-error");
});
function scrollToAbout()
{
console.log("c");
$('html, body').animate({
scrollTop: $(".about").offset().top
}, 1000);
}
});
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.