Can use without fear. This will not influence the performance, there is only an initial overload on the first load, where the file Javascript of jQuery that will be loaded. After this, the file will already be cached and there will be almost 0 cost of download.
Just make sure to use minified files in production, thus reducing the bandwidth required for download of these archives.
In cases where it will only make a small change via jQuery, try to use Javascript pure instead of carrying the jQuery just to insert a piece of content into the page for example.
Below an insert code of HTML on the page with pure javascript:
var newItem = document.createElement("LI"); // Create a <li> node
var textnode = document.createTextNode("Water"); // Create a text node
newItem.appendChild(textnode); // Append the text to <li>
var list = document.getElementById("myList"); // Get the <ul> element to insert a new node
list.insertBefore(newItem, list.childNodes[0]); // Insert <li> before the first child of <ul>
This example was taken from W3schools website:
** Edited **
In the matter of SEO, you must put files Javascript at the bottom of the page to prevent file loading from blocking the page, thus generating delay in loading the site. You can even ask Google for an analysis to check the site and have some instructions to improve it. Clicking here you go to the analysis site of Google.
Think of everything you’re doing with jQuery, it’s being converted to javascript behind the scenes. Its use is recommended to make code smaller and cleaner in medium and large projects. But adding an entire library to not use one or two lines of pure javascript in your project, in addition to a bad practice, becomes laziness. Because it wouldn’t be hard to find the same code on the internet in pure javascript!
– alan