<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: hcms/forms/v2.js and jquery-1.7.1.js in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/hcms-forms-v2-js-and-jquery-1-7-1-js/m-p/1096373#M79629</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/875343"&gt;@SEsposito4&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A straight update to the latest version can indeed break some functionality on your website that relies on jQuery. That is why the documentation suggests using&amp;nbsp;the &lt;A href="https://community.hubspot.com/t5/APIs-Integrations/hcms-forms-v2-js-and-jquery-1-7-1-js/m-p/1095466#M79577" target="_blank" rel="noopener"&gt;jQuery Migrate plugin&lt;/A&gt;. It can be used to bridge the gap between the old version and the new version without breaking functionality.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The intent is to use that plugin to spot any issues that would come up because&amp;nbsp;of the upgrade and then adjust the code to resolve them. Once all of them are resolved, the Migrate plugin can be removed. However, there are some instances where fixing everything may come at a too high of a cost and people might choose to leave the Migrate plugin running permanently (or until website redesign), which does slightly impact performance (more resources to load).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you were to successfully upgrade to the latest version and don't need the Migrate plugin, then there should be &lt;EM&gt;some&lt;/EM&gt; performance improvement, though it would not be significant. Most of the benefit would come from improved security.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Ultimately, if the jQuery usage&amp;nbsp;is limited only to the mobile navigation, you could look into rebuilding it with plain javascript, which would allow you to remove jQuery from your website entirely. That would provide the biggest performance boost in this situation.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 18 Jan 2025 15:17:39 GMT</pubDate>
    <dc:creator>evaldas</dc:creator>
    <dc:date>2025-01-18T15:17:39Z</dc:date>
    <item>
      <title>hcms/forms/v2.js and jquery-1.7.1.js</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/hcms-forms-v2-js-and-jquery-1-7-1-js/m-p/1087317#M79174</link>
      <description>&lt;P&gt;I am not very fluent in the developer landscape so I need assistance. I am trying to reduce the size of page network requests for improving page speed.&amp;nbsp;hcms/forms/v2.js and jquery-1.7.1.js are the two largest request sizes and are causing the majority of the issues.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I understand the one is related to form integration into the website but the code feels incredibly bloated for what my website needs. Are there any alternatives or solutions to reduce my page network requests here?&lt;/P&gt;</description>
      <pubDate>Thu, 26 Dec 2024 17:59:27 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/hcms-forms-v2-js-and-jquery-1-7-1-js/m-p/1087317#M79174</guid>
      <dc:creator>SEsposito4</dc:creator>
      <dc:date>2024-12-26T17:59:27Z</dc:date>
    </item>
    <item>
      <title>Re: hcms/forms/v2.js and jquery-1.7.1.js</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/hcms-forms-v2-js-and-jquery-1-7-1-js/m-p/1087331#M79175</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/875343"&gt;@SEsposito4&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The&amp;nbsp;&lt;SPAN&gt;hcms/forms/v2.js is indeed a critical piece that handles HubSpot forms. You might find some suggestions in &lt;A href="https://community.hubspot.com/t5/Blog-Website-Page-Publishing/Speed-of-Forms-loading/m-p/440443?t" target="_blank" rel="noopener"&gt;this community thread&lt;/A&gt;&amp;nbsp;about possible optimizations.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Regarding&amp;nbsp;jquery-1.7.1.js - that depends on how heavily your websites relies on jQuery. This &lt;A href="https://developers.hubspot.com/docs/guides/cms/improve-older-sites/upgrade-jquery" target="_blank" rel="noopener"&gt;developer doc&lt;/A&gt; explains the process of upgrading to the latest version of jQuery and it also has a &lt;A href="https://developers.hubspot.com/docs/guides/cms/improve-older-sites/upgrade-jquery#1.-identify-where-jquery-is-being-used" target="_blank" rel="noopener"&gt;section&lt;/A&gt; for checking whether your website uses it.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you find that jQuery is being used, you would certainly need a developer to help with updating your theme/templates to move away from jQuery. However, that might be a huge project in of itself, so it may be worth considering a migration to a different theme that does not use jQuery instead.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Either way, at the very least, upgrading to the latest version of jQuery (currently&amp;nbsp;&lt;SPAN&gt;3.7.1)&lt;/SPAN&gt; is strongly recommended.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps!&lt;/P&gt;</description>
      <pubDate>Thu, 26 Dec 2024 18:52:55 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/hcms-forms-v2-js-and-jquery-1-7-1-js/m-p/1087331#M79175</guid>
      <dc:creator>evaldas</dc:creator>
      <dc:date>2024-12-26T18:52:55Z</dc:date>
    </item>
    <item>
      <title>Re: hcms/forms/v2.js and jquery-1.7.1.js</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/hcms-forms-v2-js-and-jquery-1-7-1-js/m-p/1087336#M79176</link>
      <description>&lt;P&gt;Thank you so much this is very helpful!&lt;/P&gt;</description>
      <pubDate>Thu, 26 Dec 2024 19:13:09 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/hcms-forms-v2-js-and-jquery-1-7-1-js/m-p/1087336#M79176</guid>
      <dc:creator>SEsposito4</dc:creator>
      <dc:date>2024-12-26T19:13:09Z</dc:date>
    </item>
    <item>
      <title>Re: hcms/forms/v2.js and jquery-1.7.1.js</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/hcms-forms-v2-js-and-jquery-1-7-1-js/m-p/1095466#M79577</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/53048"&gt;@evaldas&lt;/a&gt;, quick question about updating the jQuery. It is flagging my mobile navigation as using jQuery, I was wondering if updating will break this function or other functions on my site?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, will updating improve my sites performance at all?&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jan 2025 17:57:36 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/hcms-forms-v2-js-and-jquery-1-7-1-js/m-p/1095466#M79577</guid>
      <dc:creator>SEsposito4</dc:creator>
      <dc:date>2025-01-16T17:57:36Z</dc:date>
    </item>
    <item>
      <title>Re: hcms/forms/v2.js and jquery-1.7.1.js</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/hcms-forms-v2-js-and-jquery-1-7-1-js/m-p/1096373#M79629</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/875343"&gt;@SEsposito4&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A straight update to the latest version can indeed break some functionality on your website that relies on jQuery. That is why the documentation suggests using&amp;nbsp;the &lt;A href="https://community.hubspot.com/t5/APIs-Integrations/hcms-forms-v2-js-and-jquery-1-7-1-js/m-p/1095466#M79577" target="_blank" rel="noopener"&gt;jQuery Migrate plugin&lt;/A&gt;. It can be used to bridge the gap between the old version and the new version without breaking functionality.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The intent is to use that plugin to spot any issues that would come up because&amp;nbsp;of the upgrade and then adjust the code to resolve them. Once all of them are resolved, the Migrate plugin can be removed. However, there are some instances where fixing everything may come at a too high of a cost and people might choose to leave the Migrate plugin running permanently (or until website redesign), which does slightly impact performance (more resources to load).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you were to successfully upgrade to the latest version and don't need the Migrate plugin, then there should be &lt;EM&gt;some&lt;/EM&gt; performance improvement, though it would not be significant. Most of the benefit would come from improved security.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Ultimately, if the jQuery usage&amp;nbsp;is limited only to the mobile navigation, you could look into rebuilding it with plain javascript, which would allow you to remove jQuery from your website entirely. That would provide the biggest performance boost in this situation.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 18 Jan 2025 15:17:39 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/hcms-forms-v2-js-and-jquery-1-7-1-js/m-p/1096373#M79629</guid>
      <dc:creator>evaldas</dc:creator>
      <dc:date>2025-01-18T15:17:39Z</dc:date>
    </item>
    <item>
      <title>Re: hcms/forms/v2.js and jquery-1.7.1.js</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/hcms-forms-v2-js-and-jquery-1-7-1-js/m-p/1102105#M80003</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/53048"&gt;@evaldas&lt;/a&gt;, revisting this idea of rebuilding in vanilla JS. If we rebuilt just the mobile menu would we need to change any other files to keep functional? This is currently what I am workshopping (with assistance):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;document.addEventListener("DOMContentLoaded", function () {

  /** 
   * Mobile Nav
   *
   * Hubspot Standard Toggle Menu
   */

  // Add mobile trigger button with 'Menu'
  const mobileTrigLink = document.querySelector('.hs-mobile-trig a');
  if (mobileTrigLink) {
    const mobileTriggerDiv = document.createElement('div');
    mobileTriggerDiv.classList.add('mobile-trigger');
    const mobileTriggerLink = document.createElement('a');
    mobileTriggerLink.href = '';
    mobileTriggerLink.textContent = 'Menu';
    mobileTriggerDiv.appendChild(mobileTriggerLink);
    mobileTrigLink.before(mobileTriggerDiv);
  }

  // Event listener for mobile menu trigger
  const mobileTrigger = document.querySelector('.mobile-trigger');
  if (mobileTrigger) {
    mobileTrigger.addEventListener('click', function (event) {
      event.preventDefault();  // Prevent default link behavior
      document.body.classList.add('mobile-open');  // Add the 'mobile-open' class
    });
  }

  // Close mobile menu on 'close' button click
  const closeBtn = document.querySelector('span.close');
  if (closeBtn) {
    closeBtn.addEventListener('click', function (event) {
      event.preventDefault();
      document.body.classList.remove('mobile-open');  // Remove 'mobile-open' class
    });
  }

  // Back to top button
  const backToTopButton = document.createElement('a');
  backToTopButton.id = 'back-to-top';
  backToTopButton.href = 'top';
  const backToTopIcon = document.createElement('i');
  backToTopIcon.classList.add('fa', 'fa-chevron-up', 'fa-2x');
  backToTopButton.appendChild(backToTopIcon);

  const footerContainerWrapper = document.querySelector('.footer-container-wrapper');
  if (footerContainerWrapper) {
    footerContainerWrapper.after(backToTopButton);
  }

  backToTopButton.style.display = 'none';

  window.addEventListener('scroll', function () {
    if (window.scrollY &amp;gt; 100) {
      backToTopButton.style.display = 'block';
    } else {
      backToTopButton.style.display = 'none';
    }
  });

  // Scroll to top on back to top button click
  backToTopButton.addEventListener('click', function (event) {
    event.preventDefault();
    window.scrollTo({ top: 0, behavior: 'smooth' });  // Smooth scroll to the top
  });

  // Add padding to body if no banner area exists
  const bannerArea = document.querySelector('.hs-banner-area');
  if (!bannerArea) {
    document.body.classList.add('hs_has_padding');  // Add padding if no banner exists
  }

  // Add scroll-body class on scroll
  window.addEventListener('scroll', function () {
    if (window.scrollY &amp;gt; 10) {
      document.body.classList.add('scroll-body');
    } else {
      document.body.classList.remove('scroll-body');
    }
  });

  // Adjust restaurant item min-height on load/resize
  const restaurantItems = document.querySelectorAll('.hs-restaurants-group .hs-item');
  function adjustRestaurantItemHeight() {
    restaurantItems.forEach(function (item) {
      const hover = item.querySelector('.hover');
      if (hover) {
        item.style.minHeight = hover.offsetHeight + 20 + 'px';
      }
    });
  }
  window.addEventListener('load', adjustRestaurantItemHeight);
  window.addEventListener('resize', adjustRestaurantItemHeight);

  // Smooth scroll for anchor links
  const anchorLinks = document.querySelectorAll('a[href*=""]:not([href=""])');
  anchorLinks.forEach(function (link) {
    link.addEventListener('click', function (event) {
      const target = document.querySelector();
      if (target) {
        event.preventDefault();
        window.scrollTo({ top: target.offsetTop, behavior: 'smooth' });
      }
    });
  });
});&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jan 2025 21:42:54 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/hcms-forms-v2-js-and-jquery-1-7-1-js/m-p/1102105#M80003</guid>
      <dc:creator>SEsposito4</dc:creator>
      <dc:date>2025-01-30T21:42:54Z</dc:date>
    </item>
  </channel>
</rss>

