Tagged: function.php, Magnific popup
-
AuthorPosts
-
August 19, 2018 at 10:51 am #998864
i used to show simple pop ups in enfold site using this code https://kriesi.at/support/topic/inline-content-in-magnific-popup/#post-289356
but lately it seems it’s longer working
I’ve searched the support forum and ran into this massage https://kriesi.at/support/topic/code-snippet-inline-post-content-popup-magnific-popup-shortcode/#post-918779
so i tried to replace the old code with the new code but than the page who contained the pop ups wont finish loading (stuck with the loader animation) and chrome console yields the following error:(index):569 Uncaught TypeError: $(...).magnificPopup is not a function at HTMLDocument.<anonymous> ((index):569) at i (jquery.js?ver=1.12.4:2) at Object.fireWith [as resolveWith] (jquery.js?ver=1.12.4:2) at Function.ready (jquery.js?ver=1.12.4:2) at HTMLDocument.K (jquery.js?ver=1.12.4:2) (anonymous) @ (index):569 i @ jquery.js?ver=1.12.4:2 fireWith @ jquery.js?ver=1.12.4:2 ready @ jquery.js?ver=1.12.4:2 K @ jquery.js?ver=1.12.4:2
is there a way to fix this?
August 19, 2018 at 7:27 pm #999042Hey Doron,
Could you please give us a link to your website, we need more context to be able to help you.
Best regards,
VictoriaAugust 19, 2018 at 9:06 pm #999086Hi Victoria and thank you for looking into this
i posted the link to the problematic page in the Private Content
it’s an ‘About’ page and if you scroll down to the each team member you will see a beginning of description and than a ‘read more’ link
till lately the script worked with no problem and clicking the ‘read more’ reveled the rest of the team member description in a simple pop up
but now when you click it no pop up shows and in the console there is an error:Uncaught TypeError: $(...).magnificPopup is not a function at (index):528 at dispatch (jquery.js?ver=1.12.4:3) at r.handle (jquery.js?ver=1.12.4:3)
please notice: i had to roll back to the old script (https://kriesi.at/support/topic/inline-content-in-magnific-popup/#post-289356) because if i use the new one (https://kriesi.at/support/topic/code-snippet-inline-post-content-popup-magnific-popup-shortcode/#post-918779) the page with the pop ups wont load at all (will stuck with the loader animation) and the site is live in the air so i rather have the pop won’t showing than the whole page not loading at all
but, any way, it seems that – no matter if I use the old or the new script – the chrome console error massage will still be:$(...).magnificPopup is not a function
so..may be the root if the problem is not in the script?August 20, 2018 at 9:18 am #999236Hi Doron,
Looks like you need to explicitly enqueue the script for the popup
https://gist.github.com/johnbuck/6277503If you need further assistance please let us know.
Best regards,
VictoriaAugust 20, 2018 at 11:36 am #999305Hi Victoria thanks for pointing me in to the right direction
actually it’s much more easier to Register and enqueue magnific Popup scripts by simply installng it as a plugin (https://he.wordpress.org/plugins/wp-magnific-lightbox/)
now even the old code is working perfectlyAugust 20, 2018 at 4:55 pm #999496Hi Doron,
Glad you got it working for you! :)
If you need further assistance please let us know.
Best regards,
Victoria -
AuthorPosts
- You must be logged in to reply to this topic.