How to prevent conflict between Jotform lightbox/feedback and jQuery?
-
adficientAsked on March 28, 2013 at 01:17 PM
I'm using WordPress and it loads jQuery automatically, so when I use jotform's feedback icon, it loads jQuery again (older version of jQuery) and it screws up my other WordPress scripts like carousels and such. Is there a way to disable Jotform from loading jQuery?
-
WelvinAnswered on March 28, 2013 at 01:55 PMJotform Support
Hi,
I think the codes are conflicting to each other. Please try to edit your page and add this codes:
<script type="text/javascript"> $.noConflict();</script>
See if this helps.
Thanks
-
jeanettebmzAnswered on March 28, 2013 at 01:58 PM
In addition to what Welvin has adviced to you, you would need to insert that line of code right before the Feedback code , for example
<script type="text/javascript"> $.noConflict();</script>
<script src="//cdn.jotfor.ms/static/feedback2.js?3.1.2443" type="text/javascript">
new JotformFeedback({
formId : "1234567890".........
-
adficientAnswered on March 28, 2013 at 02:26 PM
I tried that but it still conflicted with the other scripts.
I also tried jQuery.noConflict(); since it's WP, but that didn't seem to work either.
-
jeanettebmzAnswered on March 28, 2013 at 02:54 PM
I think there is no straightforward solution to this, another option would be to use a jquery lightbox plugin such as http://www.shadowbox-js.com/ then render the form in an iframe within that.
--With shadow box installed this code should work to render your form:
<script>
function OpeniFrameURL(url) {
Shadowbox.open({
content: url,
player: "iframe",
height: 500,
width: 700
});
}
</script>
Then call it from a link
<a target="_blank" href="#" onlick="javascript: OpeniFrameURL('http://www.jotform.com/form/23574840162150');return false;">Link to open your form</a>I hope that works in WP, I haven't tested it there .
-
adficientAnswered on March 28, 2013 at 03:08 PM
Ok thanks. Yea I was thinking I could just create my own lightbox and fixed botton. I'll try that. Thanks!