Announcement

Collapse
No announcement yet.

Need additional popups

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

    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?

    Leslie Kirk
    Miva Certified Developer
    Miva Merchant Specialist since 1997
    Previously of Webs Your Way
    (aka Leslie Nord leslienord)

    Email me: [email protected]
    www.lesliekirk.com

    Follow me: Twitter | Facebook | FourSquare | Pinterest | Flickr

    #2
    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.
    Matt Zimmermann

    Miva Web Developer
    Alchemy Web Development
    https://www.alchemywebdev.com
    Site Development - Maintenance - Consultation

    Miva Certified Developer
    Miva Professional Developer

    https://www.dev4web.net | Twitter

    Comment


      #3
      remove the defer from the jquery call...if that doesn't work, try using "jQuery(document).ready(function() {..."
      Bruce Golub
      Phosphor Media - "Your Success is our Business"

      Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
      phosphormedia.com

      Comment


        #4
        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
        Leslie Kirk
        Miva Certified Developer
        Miva Merchant Specialist since 1997
        Previously of Webs Your Way
        (aka Leslie Nord leslienord)

        Email me: [email protected]
        www.lesliekirk.com

        Follow me: Twitter | Facebook | FourSquare | Pinterest | Flickr

        Comment

        Working...
        X