kossnocorp / role Goto Github PK
View Code? Open in Web Editor NEWjQuery plugin to provide easy way to handle DOM elements by role attribute
Home Page: http://code.nocorp.me/role/
jQuery plugin to provide easy way to handle DOM elements by role attribute
Home Page: http://code.nocorp.me/role/
Uncaught Error: Syntax error, unrecognized expression: @container
EOM
Why do you not publish this plugin to bower? I use this plugin at my projects and i glad to see this plugin in bower.
If I want to use 'data-role' instead of 'role', it will be good to have a variable on top of jquery.role.js for that purpose. Also, this will provide less size for jquery.role.min.js.
Allow to use role library without any framework.
Assuming i have this element in DOM:
<div data-email="[email protected]"></div>
when I try to find it with jQuery:
$('[data-email="[email protected]"]').length;
I get nothing:
> 0
Real live example:
$.r('#image_uploads').delegate('[role="check"]', 'change', recalculateImageIds);
turn to:
$.r('#image_uploads').delegate( $.rs('check'), 'change', recalculateImageIds );
API:
$.roleSelector('check'); // returns '[role="check"]'
$.roleSelector('#check'); // returns '#role-check'
$.rs('check'); // alias to roleSelector
Role attribute can has many roles, example:
<ul role="navigation sitemap">
<li href="downloads">Downloads</li>
<li href="docs">Documentation</li>
<li href="news">News</li>
</ul>
Jquery.role should mess with this case.
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.