All Projects → ngs → Jquery Selectorator

ngs / Jquery Selectorator

Licence: mit
jQuery plugin that returns simplest selector of elements.

Programming Languages

javascript
184084 projects - #8 most used programming language

jQuery Selectorator

jQuery plugin that returns simplest selector of elements.

Build Status

Getting Started

<script src="jquery.js"></script>
<script src="dist/selectorator.min.js"></script>

Documentation

jQuery.fn.getSelector(options = {})

Returns an array of simplest selectors of the element.

jQuery.fn.selectorator(options = {})

Returns Selectorator instance.

jQuery.seletortor.options = []

Default options.

options.ignore.classes = []

options.ignore.names = []

options.ignore.ids = []

options.ignore.class = ''

options.ignore.name = ''

options.ignore.id = ''

String or Array of values to ignore from generated selectors.

Examples

$("a").on("click", function(){
  alert($(this).getSelector().join("\n"));
  return false;
});

Testing

$ npm install
$ npm test

Author

License

MIT License

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].