midori Javascript Framework
This article needs references that appear in reliable third-party publications. Primary sources or sources affiliated with the subject are generally not sufficient for a Wikipedia article. Please add more appropriate citations from reliable sources. (November 2009) |
Developer(s) | Aycan Gulez |
---|---|
Stable release | 2009.11 / November 15, 2009 |
Written in | JavaScript |
Type | Web application framework |
License | MIT License |
Website | http://www.midorijs.com |
midori is a lightweight[1] JavaScript library that aims to make JavaScript web development easier. It was created by Aycan Gulez.
Features
- DOM element selection using CSS selectors
- Tabs
- Drag and Drop
- Effects
- Pop-up menus
- Ajax with history support
- Autocomplete
- Inline Edit
- Table row selection
- DOM, cookie, form, string and array utility methods
Use
midori consists of 10 modules and is available as a single JavaScript file. It can be included within any web page by using the following markup:
<script type="text/javascript" src="path/to/midori.js"></script>
midori allows the use of standard CSS syntax to access DOM elements, and supports most CSS2 and CSS3 selectors[2]. There are three ways to work on returned DOM elements.
- Passing JavaScript code to modify a single property, using the built-in
apply()
method:
// Sets the background color of all the cells in even rows to "yellow" in the "cities" table
midori.get('#cities tr:nth-child(even) td').apply('style.backgroundColor = "yellow"');
- Passing a function that takes a single parameter for more complex operations, again using the
apply()
method:
// Marks the cells whose values are 12 or bigger in the "cities" table
midori.get('#cities td').apply(function (o) {
if (parseInt(o.innerHTML) >= 12) o.style.backgroundColor = 'red';
} );
- Directly accessing array entries returned by
midori.get()
is also possible.
// Returns the first div element
var firstDiv = midori.get('div')[0];
References
External links
es:Midori (biblioteca) pl:Midori (biblioteka programistyczna)
If you like SEOmastering Site, you can support it by - BTC: bc1qppjcl3c2cyjazy6lepmrv3fh6ke9mxs7zpfky0 , TRC20 and more...
- Pages where expansion depth is exceeded
- Pages using deprecated source tags
- Pages with syntax highlighting errors
- Pages with broken file links
- Articles lacking reliable references from November 2009
- Articles with invalid date parameter in template
- All articles lacking reliable references
- JavaScript libraries
- Software using the MIT license