Announcement

Collapse
No announcement yet.

jquery in static HTML module

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Glenn Vergara
    replied
    Found it. https://tracker.vbulletin.com/vbulle...sues/VBV-11129

    Leave a comment:


  • Glenn Vergara
    replied
    I added a JIRA a long time ago to create an option to include jQuery to the head for this purpose. I will post it when I find it.

    Leave a comment:


  • Glenn Vergara
    replied
    The problem is jQuery is included at the bottom of the page. So an HTML module cannot use jQuery right away. It has to wait until the page has completely loaded before using jQuery.

    So the code in HTML module would be:

    Code:
    <script>
    window.addEventListener('load', function() {
        //jQuery can be used here
    });
    </script>
    The problem with this is you may see "flashing" of content as you can see the content before and after jQuery does something on it.

    Leave a comment:


  • Wayne Luke
    replied
    You shouldn't have to add jQuery to the module unless it is in an iframe. vBulletin will already include jQuery on the page. It should be available already.
    Last edited by Wayne Luke; Mon 14th May '18, 8:29am.

    Leave a comment:


  • In Omnibus
    started a topic jquery in static HTML module

    jquery in static HTML module

    I'm trying to add a simple HTML script with CSS and JS to a static HTML module.

    The HTML and CSS are working perfectly.

    The jquery meta tag is breaking the page.

    How do I add jquery to a static HTML module without it breaking the page?

Related Topics

Collapse

Working...
X