Last active
December 30, 2017 09:45
-
-
Save az1979/ae2fdb40c1d3717dfae2e8c167c02a38 to your computer and use it in GitHub Desktop.
WordPressの記事の一部を折りたたんで表示する方法 – JS
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
jQuery(function(){ | |
jQuery('[data-slide-contents]').click(function(event) { | |
event.preventDefault(); | |
var slideContents = jQuery(this).data('slide-contents'); | |
jQuery('#' + slideContents).slideToggle(400); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment