Masonry in WP for Safari (6 posts)

  1. JRiley21
    Posted 3 years ago #

    Hello all,

    I have Masonry working for a custom loop. It seems to work everywhere excerpt for Safari.

    This is the exact script I'm using:

    <script language="javascript" type="text/javascript" src="<?php bloginfo('template_url'); ?>/js/jquery.masonry.min.js"></script>
    <script type="text/javascript">
      $('#linky').masonry({ singleMode: true });

    Any help would be greatly appreciated!

  2. Can you provide a link to your site please?

  3. JRiley21
    Posted 3 years ago #

    Hi Christine, sure!


    Any help would be awesome! :)

  4. Masonry isn't working on Chrome either.
    Do you have jQuery enqueued properly?
    That should be done in your functions.php file.
    I don't see a call to jQuery anywhere in your source code.

  5. JRiley21
    Posted 3 years ago #

    Hi Christine,

    Thanks for the quick reply! Here's what I have in my header. I'm guessing this isn't doing the trick?

    <!-- Include jQuery -->
    <?php wp_enqueue_script('jquery'); ?>

    I tried to call this up in the Functions using this below, but that didn't seem to help the issue:

    function my_init() {
    	if (!is_admin()) {
    add_action('init', 'my_init');

    Any idea what I'm doing wrong here? Once again, thanks for all your help!

  6. JRiley21
    Posted 3 years ago #

    Okay, so, this keeps getting more confusing, haha. I used this code to test out my jQuery:

    <script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js'></script>
    <script type="text/javascript">
    	$("div").css("border", "3px solid red");

    It worked in Firefox and Mac Chrome, but didn't in Safari or PC Chrome. So, clearly there's a major conflict of some sort.

    I went through and deactivated all my plugins, but that didn't do the trick. I stripped out my enqueue reference for jQuery in the functions and header. All of this didn't seem to fix my issue.

    Any ideas? Anyone?


Topic Closed

This topic has been closed to new replies.

About this Topic