Closed
Description
The CDN version also includes the $()
function starting from v4.0.0, so it's quite interesting to work with jQuery. Although, for me, this is a bizarre combination, I noticed the issue on StackOverflow: TailwindCSS v4 Play CDN not working with jQuery
Reproduction#01
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script src="https://unpkg.com/@tailwindcss/browser@4"></script>
$(document).ready(function () {
alert("Hello world");
});
Uncaught TypeError: $(...).ready is not a function
Reproduction#02
<script src="https://unpkg.com/@tailwindcss/browser@4"></script>
console.log($)
function $(t,r,o){return P("@property",t,[a("syntax",o?`"${o}"`:'"*"'),a("inherits","false"),...r?[a("initial-value",r)]:[]])}
It doesn't have much of an impact on me, so I haven't tested whether this affects the npm package, but my initial assumption is that it doesn't. I just wanted to mention the incompatibility between the CDN and jQuery.