jquery masonry plugin – neewbie troubles
-
Hello I am new to this world so please be gentle…
I have a bit of background in coding and designing static websites so I know my way around a little but have moved over to the lightside and getting into WP.
I have a problem getting Masonry plugin to work. I have followed a tutorial but I can’t get it to work.
I have this in my head.php
<?php wp_enqueue_script("jquery"); ?> <?php /* We add some JavaScript to pages with the comment form * to support sites with threaded comments (when in use). */ if ( is_singular() && get_option( 'thread_comments' ) ) wp_enqueue_script( 'comment-reply' ); /* Always have wp_head() just before the closing </head> * tag of your theme, or you will break many plugins, which * generally use this hook to add elements to <head> such * as styles, scripts, and meta tags. */ wp_head(); ?> <script language="javascript" type="text/javascript" src="<?php bloginfo('template_url'); ?>https://distinctsignal.co.uk/js/jquery.masonry.min.js"></script> <script type="text/javascript"> jQuery(document).ready(function($){ $('#linky').masonry({ singleMode: true }); }) </script> </head>
I have a #linky with further <div>’s inside but it just seems to be laying the divs out in a vertical fashion.
Could it be something to do with the file structure? My ‘js’ file is in beside the wp-admin etc folders.
Any help would be fantastic!!
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘jquery masonry plugin – neewbie troubles’ is closed to new replies.