-
-
Save Asikur22/4a01c1b169334b360e31 to your computer and use it in GitHub Desktop.
[Enable Built-In JavaScript Masonry in WordPress] #Enqueue #Scripts
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 jk_masonry() { | |
wp_enqueue_script( 'jquery-masonry', array( 'jquery' ) ); | |
} | |
add_action( 'wp_enqueue_scripts', 'jk_masonry' ); | |
/* | |
How to use? | |
$('#container').masonry({ singleMode: true }); | |
or | |
$('#container').masonry({ columnWidth: 200 }); | |
Get masonry resources form here: http://masonry.desandro.com/ | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment