solved TypeError: $(...).qtip is not a function

nate
@nate
6 years ago
911 posts
Whenever I go to this URL http://n8flex.com/core/admin/global

I get TypeError: $(...).qtip is not a function and my ACP buttons stop working.

The error points to this line
$('#content > table').qtip({ content: { button: $('<div class="qtip-close">Start</div>'), title: 'Welcome to the ACP!', text: 'Please take a few moments to follow this small introduction tour and get to know how the Admin Control Panel (ACP) works.<br><br>Click on the "Start" button to get started.<br><ul class=\"tour-list\"><li class=\"tour-extra tour-close\"><a onclick=\"jrTips_close_tour(\'jrCore\', 0)\">Close</a></li></ul><div class=\"tour-stop\"><a onclick=\"jrTips_stop_tour()\">Don't show me Tours</a></div>' }, show: { modal: true, solo: 'html', ready: true }, position: { at: 'top center', my: 'top center'  }, hide: { fixed: true, event: 'unfocus' }, events: { hide: function(event, api) { $('.qtip.ui-tooltip').qtip('hide'); $('#mtab').qtip('enable').qtip('show');  } } , style: { tip: false } });


updated by @nate: 02 Jul 2016 02:35:54AM
brian
@brian
6 years ago
10,007 posts
Do you have the Tips module disabled? I've not seen this before.


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
michael
@michael
6 years ago
7,550 posts
.qtip is provided by the jrTips module. If you disable that module it should go away.

If you want it to show, check that there are not other javascript errors in the main compiled javascript file that comes out at:
< script type="text/javascript" src="{jrCore_javascript_src}">< /script >
in your skins meta.tpl
nate
@nate
6 years ago
911 posts
I don't wanna disable tips. I'd like to know what I need to do to stop seeing the error. I plan to sell the skin and don't want to spend hours in the forum saying "I don't know why that happens". It happens on every skin I build.

I start every new skin with jrElastic templates.
updated by @nate: 31 Mar 2016 09:44:12AM
nate
@nate
6 years ago
911 posts
Also, there are no other js errors. I use firebug.
michael
@michael
6 years ago
7,550 posts
The error your getting is:
TypeError: $(...).qtip is not a function

which is saying that the .qtip module is either not loaded or is called before the jquery file is loaded.

Got a URL I can look at?

Looks like the qtips module injects its jquery file into the footer.tpl file of elastic:
code from /skins/jrElastic/footer.tpl
{* THIS STUFF IS SO MODULES CAN INJECT THE STUFF THEY NEED INTO THE FOOTER, LEAVE IT HERE IF YOU WANT MODULES TO WORK.*}

{if isset($css_footer_href)}
    {foreach from=$css_footer_href item="_css"}
    <link rel="stylesheet" href="{$_css.source}" media="{$_css.media|default:"screen"}" />
    {/foreach}
{/if}
{if isset($javascript_footer_href)}
    {foreach from=$javascript_footer_href item="_js"}
    <script type="{$_js.type|default:"text/javascript"}" src="{$_js.source}"></script>
    {/foreach}
{/if}
{if isset($javascript_footer_function)}
    <script type="text/javascript">
    {$javascript_footer_function}
    </script>
{/if}

{* do not remove this hidden div *}
<div id="jr_temp_work_div" style="display:none"></div>

When the system tips module is on that comes out as:
       <link rel="stylesheet" href="http://jr501.hostsaba.com/modules/jrTips/contrib/qtips2/jquery.qtip.css?_v=1.0.2" media="screen"/>
                <script type="text/javascript" src="http://jr501.hostsaba.com/modules/jrTips/contrib/qtips2/imagesloaded.pkg.min.js?_v=1.0.2"></script>
            <script type="text/javascript" src="http://jr501.hostsaba.com/modules/jrTips/contrib/qtips2/jquery.qtip.min.js?_v=1.0.2"></script>
    

<div id="jr_temp_work_div" style="display:none"></div>

So take a look in your skin and see if that output is getting out to the generated HTML source code.
nate
@nate
6 years ago
911 posts
I'll check my footer.tpl. Thanks.
nate
@nate
6 years ago
911 posts
That was it. Thanks again.

Tags