vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   jquery in 4.1.11 (https://vborg.vbsupport.ru/showthread.php?t=280838)

Vincinzerei 04-03-2012 04:51 AM

already posted.
http://tracker.vbulletin.com/browse/VBIV-14632

jquery is for now only used in the mobile style. in any other cases it seems it have to be included manual.

firebrand media 01-25-2013 06:03 PM

I see this thread is a little old, but I just solved this problem on my own installation.
The clue was to look at the mobile skin.

in the "headinclude" template, add the following after the YUI stuff:

Code:

<vb:if condition="$show['remotejquery']">
        <script type="text/javascript" src="{vb:stylevar jquerymain}"></script>
</vb:if>


Jaffery 02-29-2016 02:04 PM

An old thread but if you wish to go little better then do it like :

Code:

<vb:if condition="$show['remotejquery']">
        <script type="text/javascript" src="{vb:stylevar jquerymain}"></script>
</vb:if>

<script type="text/javascript">
        if (typeof jQuery === 'undefined') // Load jQuery Local
        {
                document.write('<script type="text/javascript" src="clientscript/jquery/jquery-{vb:stylevar jqueryversion}.min.js"><\/script>');
                var remotejquery = false;
        }
        else        // Load Rest of jquery remotely (where possible)
        {
                var remotejquery = true;
        }
</script>

What it will do that if remote jquery is enabled then will load it, if somehow remote link is not working, it will load local as well when remote is off, it will again load local.

webmastersun 02-29-2016 03:35 PM

I think Jquery should add one time at header template.

It will work as well on all templates


All times are GMT. The time now is 10:23 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.00987 seconds
  • Memory Usage 1,721KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete