Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/atufkas/jquery-microtools

jQuery extended by useful pseudo-selectors and functions for fine tuned layouts
https://github.com/atufkas/jquery-microtools

Last synced: 10 days ago
JSON representation

jQuery extended by useful pseudo-selectors and functions for fine tuned layouts

Awesome Lists containing this project

README

        

# jQuery Microtools

## About

_Note: idea/project at very early stage_

jQuery Microtools is a plugin for [jQuery](https://github.com/jquery/jquery) that aims to extend jQuery with some
useful functions/psudo-selectors potentially needed somewhere... let's say: if fine tuning layouts matters.
It is not officially registered with the jQuery plugin registry yet.

Currently implemented:

* pseudo-selector for fetching elements with current content overflow on any axis: `:mt-overflow`
* pseudo-selector for fetching elements with current content overflow on x-axis: `:mt-overflow-x`
* pseudo-selector for fetching elements with current content overflow on y-axis: `:mt-overflow-y`

## Usage

Example for styling all elements having class _myclass_ applied with a red border by using mt-overflow pseudo-selector:

In your main script:
```
$(document).ready(function() {
$('.myclass:mt-overflow').addClass('overflow-warning');
});
```

In your CSS definitions:
```
.overflow-warning {
border-color: 1px dotted red;
}
```

pseudo-selectors are prefixed with `mt-` for reducing the risk of potential namespace-clashes.

## Installation

Be sure you already included jQuery in your project (> 1.10.1 is demanded, though > 1.8.x should work anyway).

Clone git repository...

```
$ git clone [email protected]:atufkas/jquery-microtools.git
```

...or install via bower:

```
$ bower install [email protected]:atufkas/jquery-microtools.git
```

## Contribute

Ideas, suggestions and pull requests are welcome.

## License

[The MIT License](http://opensource.org/licenses/MIT)

Copyright (c) 2013 Matthias Lienau <[email protected]>