Hello everybody.
I'm using magnificpopup to display a contact form, which works as expected.
But to personalise the popup, I'm trying to add my own custom close functionality using a material icon on the form.
In the icon's properties, I added an "onclick" event to run the following javascript (as described in the magnificpopup documentation):
$.magnificPopup.close();
However, when the icon is clicked, nothing happens and the following error is generated:
Uncaught ReferenceError: $ is not defined at HTMLAnchorElement.onclick
My javascript/jquery skills are pretty basic. So to stop me from pulling out what little hair I have left, help from anybody who has managed to achieve this (or is willing to achieve this) would be much appreciated.
Cheers.
magnificpopup - Adding a custom close icon
Forum rules
PLEASE READ THE FORUM RULES BEFORE YOU POST:
viewtopic.php?f=12&t=1901
MUST READ:
http://www.wysiwygwebbuilder.com/forms.html
http://www.wysiwygwebbuilder.com/form_wizard.html
Frequently Asked Questions about Forms
PLEASE READ THE FORUM RULES BEFORE YOU POST:
viewtopic.php?f=12&t=1901
MUST READ:
http://www.wysiwygwebbuilder.com/forms.html
http://www.wysiwygwebbuilder.com/form_wizard.html
Frequently Asked Questions about Forms
Re: magnificpopup - Adding a custom close icon
I'm sorry, I cannot help you to cusomize the code.
- BaconFries
-
- Posts: 5640
- Joined: Thu Aug 16, 2007 7:32 pm
Re: magnificpopup - Adding a custom close icon
Forum member rogerl posted his solution on GitHub see the following url Note for information only
https://github.com/dimsemenov/Magnific- ... ssues/1041
There is also an extension by forum member jordan
viewtopic.php?f=42&t=72671
https://github.com/dimsemenov/Magnific- ... ssues/1041
There is also an extension by forum member jordan
viewtopic.php?f=42&t=72671
Re: magnificpopup - Adding a custom close icon
Ok Pablo, thanks anyhow.
Thank you for that BF - I'll take a look.
If I manage to solve it, I'll post back.
Cheers.
Thank you for that BF - I'll take a look.
If I manage to solve it, I'll post back.
Cheers.