Avoid Selectors Hell - is extremely tiny jquery plugin to simplify work with columns in tables
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
native Native version Jan 24, 2016
LICENSE Initial commit Jan 24, 2016
README.md Created demo Jan 24, 2016
ash.js Fixed spaces Jan 24, 2016
ash.min.js First version Jan 24, 2016
example.html First version Jan 24, 2016


ASH Native script && jQuery Plugin

Avoid Selectors Hell - is an extremely tiny tool to simplify work with columns in tables

jQuery demo: http://tryshchenko.com/samples/ash/ Native js demo: http://tryshchenko.com/samples/ash-native/

How to use jQuery version

You can use a pretty syntax for your operations:


Also you can pass arguments to 'hideColumn', 'toggleColumns', or 'showColumn' functions. You can use 'slow', 'fast', 400 or any other values available for 'hide', 'toggle' and 'show' methods.

    $('table').hideColumn(1, 'fast');
    $('table').showColumn(1, 400);
    $('table').toggleColumn(3, 'fast');

All these expressions is correct.

Library also provides a simple helper to select column:

    $('table').getColumn(2); //it's is a jQuery object.
    //For example: 
    $('table').getColumn(2).css('color', 'red');

How to use a native version

Basicaly script provides the similar API:


As you can understand - difference is in table selection process: in this case ASH handles selectors instead of jQuery.


Library also provides a simple helper to select column. In case of native library you should use native modifiers:

    var cells = ash.get('.table').getColumn(3); //it's is a js DOM object.
    //For example: 
	for (var i = 0; i < cells.length; i++) {
		cells[i].style.color = 'green';

It's a tiny helpers useful for me, and I'll be happy if it will help you.