bendc / sprint Goto Github PK
View Code? Open in Web Editor NEWA tiny, lightning fast jQuery-like library for modern browsers.
License: MIT License
A tiny, lightning fast jQuery-like library for modern browsers.
License: MIT License
Maybe I'm asking a dumb question, I see that this is an "alternative" not a replacement, but I can't find any proper info on how to deal with jQuery and Sprint together on the same page.
So basically, how can I use Sprint along with jQuery?
I have some plugins with jQuery dependancy, how should I proceed to implement Sprint?
Since the same API is used will there be conflicts if both scripts are present?
This looks like a sweet library with great potential and I'm excited to follow its development. Thought it was worth mentioning, though, that when I try to run any JSPerf tests linked to from the docs (example) JSPerf errors out with:
ReferenceError: Sprint is not defined.
ReferenceError: Zepto is not defined.
So only JQuery works. I assume it is something wrong with the setup import code:
<script src="https://sprintjs.com/prod"></script>
<script src="https://zeptojs.com/zepto.min.js"></script>
Keep up the good work!
I'd like to start a discussion as to whether it could be feasible to add support for passing a selector to .on(), to facilitate event binding to dynamically created DOM elements.
Please write which methods are not supported on IE9?
Maybe it should be split up into tiny modules so a user can require whatever she wants and bundle the modules using a build tool, to keep it even more tiny.
Here is how to do it easily:
Concept:
replace jquery in twitter bootstrap
This is a very useful plugin, but doesn't have a CDNJS location to link to. Even though it is very small, it would be nice if it was available via CDNJS for the various performance benefits it provides.
Why this example not working in sprint?
$('body').on('click', '.some-class', function() {});
Any plans to adopt SemVer in this project?
What is the browser support?
Hi @bendc ,
Could you please add git tags so that the git auto-updater in cdnjs project can recognize the correct version?
Thank you.
Could this get added to Bower for those of us that like to use package managers?
Edit: I've set up a fork and will maintain it a.k.a. actually accepting PRs. https://github.com/philplckthun/sprint
I want to keep this short: sprint
is a nice experiment to push the limits of DOM manipulation through lighter methods and new browser JavaScript APIs. It's great to have seen this project progress and 3842 stars just can't lie as well.
But contribution to this project will decline (like right now) and eventually stop, when no progress is happening. Like no issues are resolved, no pull requests are merged etc.
If you haven't got the time to maintain this project anymore, @bendc, please consider to add more maintainers.
or just create the package.json
let us happy to go:
$ npm install -S git+https://github.com/bendc/sprint.git
What pitfalls from zepto have been prevented on this library?
Why isn't there a readme file?
export throught global variable is old epoch.
could you provide an amd and commonJs export?
Cool library. ๐
Just skimming the css()
function and noticed a couple pitfalls that you may want to mention in the docs.
css()
element.css('backgroundColor') !== element.css('background-color')
css('zIndex', 0)
is treated as pixels, css('z-index', 0)
is treated as a numbercssFloat
edge caseSince your sprintjs.com has no SSL support (it seems), the protocol-relative url //sprintjs.com/prod
will just fail on https://jsperf.com/, which is the default if you have HTTPS Everywhere for Chrome. Like this:
This is not an issue with sprint per se, but you may want to revise the jspref snippets to eliminate any confusion.
Anyway, great library! ๐
For dynamically loaded/drawn content, it's required to write code like:
$(document).off('event', 'selector').on('event', 'selector', function (event) {
...
})
no?
How else could Sprint currently be used?
Will this library be packaged for npm anytime soon?
Nice library indeed!
Just noticed this issue, the code below is not showing the alert as its should show the alert from the function of the click event of the button.
$(document).ready(function() {
$( 'body' ).append( "<input type='button' id='alertdiv' value='Text of Alert Button' style='cursor:pointer' />" );
$('#alertdiv').click(function() {alert("Hello, world!");});
});
this library needs support for .ajax?
I've issued because stability and performance are my top criteria.
There's some error thrown when use with Backbone.js, due to lost some function Backbone will invoked.
Could make it compatible with Backbone.js?
That breaks compatibility with jQuery. Example:
$('body')[0].id
Works in jQuery.
While Sprint would be:
$('body').dom[0].id
If into method .css() send property, which contains the number with a point, this property will be empty. For example: .css('top', 1271.484375).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.