Created
October 11, 2018 04:57
-
-
Save haruhiko-zht/fdbca550f7a4097c458ff419a86a8495 to your computer and use it in GitHub Desktop.
slide_links()
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(function(){ | |
// クリックされた時に関数を呼び出す | |
$("#tab a").click(function(){ | |
links_slide(); | |
}); | |
// 関数 | |
function links_slide(){ | |
if($("#links-content").css("left").replace("px","") < 0){ | |
$("#links-content").animate({ | |
"left":"0px" | |
},500); | |
} else { | |
$("#links-content").animate({ | |
"left":"-470px" | |
},500); | |
} | |
} | |
// 初回のみ3秒後に実行 | |
setTimeout(function(){ | |
links_slide(); | |
},3000); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment