Announcement

Collapse
No announcement yet.

Need additional popups

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • lesliekirk
    replied
    Originally posted by Bruce - PhosphorMedia View Post
    remove the defer from the jquery call...if that doesn't work, try using "jQuery(document).ready(function() {..."
    Tried that, now I have even more errors:

    Uncaught TypeError: a is not a function
    at jquery.magnific-popup.min.js:3
    at jquery.magnific-popup.min.js:3

    Uncaught ReferenceError: jQuery is not defined

    Leave a comment:


  • Bruce - PhosphorMedia
    replied
    remove the defer from the jquery call...if that doesn't work, try using "jQuery(document).ready(function() {..."

    Leave a comment:


  • Matt Zimmermann
    replied
    Hi Leslie,

    You should be able to add the initialization code into your scripts.js file. If Magnific is not already included on the page you are using, you will need to call it in first.

    Leave a comment:


  • lesliekirk
    started a topic Need additional popups

    Need additional popups

    I was thinking that because Storyteller is using the Magnific Popup, I could use it to create an additional popup. I guess it's not as easy as adding

    Code:
    <a class="test-popup-link" href="path-to-image.jpg">Open popup</a>
      <script src="/Merchant2/themes/storyteller/js/jquery.magnific-popup.min.js" defer></script>  
    <script>    
        $(document).ready(function() {
      $('.test-popup-link').magnificPopup({
      type: 'image'
      // other options
    });
    });    
    </script>

    as I'm getting this error:

    Uncaught ReferenceError: $ is not defined

    Am I not able to use the existing javascript?

Working...
X