Magnific Popup "Uncaught TypeError: b.find is not a function"
Permalink
Hello,
I'm trying to include Magnific Popup through my page_theme.php file. It seems to be including all the files when I inspect. It also hides the popup through the mdf-hide class.
The problem is that it doesn't work on click. The hidden popup doesn't show and I get this error:
My page theme looks like this:
I'm initializing it with the standard init from the Magnific Popup documentation
I'm trying to include Magnific Popup through my page_theme.php file. It seems to be including all the files when I inspect. It also hides the popup through the mdf-hide class.
The problem is that it doesn't work on click. The hidden popup doesn't show and I get this error:
jquery-magnific-popup.js:1 Uncaught TypeError: b.find is not a function at m.fn.init.<anonymous> (jquery-magnific-popup.js:1) at Function.each (jquery.js:2) at t._parseMarkup (jquery-magnific-popup.js:1) at t.getInline (jquery-magnific-popup.js:1) at t.updateItemHTML (jquery-magnific-popup.js:1) at t.open (jquery-magnific-popup.js:1) at t._openClick (jquery-magnific-popup.js:1) at HTMLDivElement.d (jquery-magnific-popup.js:1) at HTMLDivElement.dispatch (jquery.js:4) at HTMLDivElement.r.handle (jquery.js:4) (anonymous) @ jquery-magnific-popup.js:1 each @ jquery.js:2 _parseMarkup @ jquery-magnific-popup.js:1 getInline @ jquery-magnific-popup.js:1
Viewing 15 lines of 21 lines. View entire code block.
My page theme looks like this:
class PageTheme extends Theme implements ThemeProviderInterface { public function registerAssets() { //$this->providesAsset('javascript', 'bootstrap/*'); $this->providesAsset('css', 'bootstrap/*'); $this->providesAsset('css', 'blocks/form'); $this->providesAsset('css', 'blocks/social_links'); $this->providesAsset('css', 'blocks/share_this_page'); $this->providesAsset('css', 'blocks/feature'); $this->providesAsset('css', 'blocks/testimonial'); $this->providesAsset('css', 'blocks/date_navigation'); $this->providesAsset('css', 'blocks/topic_list'); $this->providesAsset('css', 'blocks/faq'); $this->providesAsset('css', 'blocks/tags');
Viewing 15 lines of 27 lines. View entire code block.
I'm initializing it with the standard init from the Magnific Popup documentation
$('.contact').magnificPopup({ type:'inline', midClick: true // Allow opening popup on middle mouse click. Always set it to true if you don't provide alternative source in href. });