JSFiddle - React, Tailwind, and code Playground
HTML
<p>1</p>
<p>2</p>
<p>3</p>
<p>4</p>
<p>5</p>
<script>
alert($('p'))
</script>
JavaScript
var width = (window.innerWidth > 0) ? window.innerWidth : screen.width;
var head = document.getElementsByTagName('head').item(0);
if(width > 950){
var s1 = document.createElement("script");
s1.type = "text/javascript";
s1.src = "http://code.jquery.com/jquery-latest.js";
head.appendChild(s1);
}