I literally have a script like this:
$(function() {
$( sliderRange ).slider({
range: true,
min: 0,
max: time2 - time1,
values: [ 0, time2 - time1 ],
slide: function( event, ui ) {
...
}
});
});
which forms a tiny part of a complex web app.
The whole web app. does not need either JQuery or JQueryUI (which the snippet above requires)
It’s annoying to think that I must use JQuery and JQueryUI just for that tiny bit.
Is there a way to figure out the bit of code that I would have to import (since I probably use 2% of their functionality I’d rather get that 2% of the code inlined)
I don’t know if it really helps you out or not, but you could always conditionally load the jQuery library from the CDN only when it isn’t already available:
Then you don’t pay the performance hit if the user has previously visited a site that uses the same CDN, and you’re not hosting the file yourself.