Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(document).ready(function() {
- if (window.location.href.indexOf("#slide-1") > -1) {
- $('html, body').animate({
- scrollTop: $("#slide-1").offset().top
- }, 2000);
- } else if (window.location.href.indexOf("#slide-2") > -1) {
- $('html, body').animate({
- scrollTop: $("#slide-2").offset().top
- }, 2000);
- } else if (window.location.href.indexOf("#slide-3") > -1) {
- $('html, body').animate({
- scrollTop: $("#slide-3").offset().top
- }, 2000);
- } else if (window.location.href.indexOf("#slide-4") > -1) {
- $('html, body').animate({
- scrollTop: $("#slide-4").offset().top
- }, 2000);
- } else if (window.location.href.indexOf("#slide-5") > -1) {
- $('html, body').animate({
- scrollTop: $("#slide-5").offset().top
- }, 2000);
- } else if (window.location.href.indexOf("#slide-6") > -1) {
- $('html, body').animate({
- scrollTop: $("#slide-6").offset().top
- }, 2000);
- } else if (window.location.href.indexOf("#slide-7") > -1) {
- $('html, body').animate({
- scrollTop: $("#slide-7").offset().top
- }, 2000);
- } else if (window.location.href.indexOf("#slide-8") > -1) {
- $('html, body').animate({
- scrollTop: $("#slide-8").offset().top
- }, 2000);
- } else if (window.location.href.indexOf("#slide-9") > -1) {
- $('html, body').animate({
- scrollTop: $("#slide-9").offset().top
- }, 2000);
- } else if (window.location.href.indexOf("#slide-12") > -1) {
- $('html, body').animate({
- scrollTop: $("#slide-12").offset().top
- }, 2000);
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement