jQuery Focused

Simplify pages by focusing in on relevant items, based on values of elements (e.g. select, input, textarea).

This project is maintained by jtwalters

jQuery Focused


  1. Include jQuery:

    <script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js"></script>
  2. Include plugin's code:

    <script src="dist/jquery.focused.min.js"></script>
  3. Call the plugin:

      // attr: {string} attribute to use as selector
      attr: 'data-focus',
      // changeElement: {jQuery object or selector} to bind the change event handler to
      changeElement: 'select[name=focus]',
      // bindChange: {boolean} whether we should update on change event (if false, only updates on initialization)
      bindChange: true,
      // value: (optional) {function} to modify the value before using it
      value: null,
      // afterUpdate: (optional) {function} to run after the value has changed
      afterUpdate: function focusTransition() {


Demo 1 - Select


Check CONTRIBUTING.md for more information.


MIT License © Joel Walters