<commit_before># jquery.select-multiple.js

This is an awesome user-friendlier drop-in replacement for the standard <select> with multiple attribute activated.

# Features
    - Free (under MIT license)
    - Works in an unobtrusive fashion
    - Fully open sourced
    - Keyboard support
    - Provides some callbacks
    - Fully customizable via CSS
    - Depends on jQuery 1.8+
    - Tiny code ~8kb minified
    - [https://github.com/krazedkrish/select-multiple-rails](gem for Rails)

# Usage

### HTML

```html
<html>
  <head>
    <link href="path/to/select-multiple.css" media="screen" rel="stylesheet" type="text/css">
  </head>
  <body>
    <select multiple="multiple" id="my-select" name="my-select[]">
      <option value='elem_1'>elem 1</option>
      <option value='elem_2'>elem 2</option>
      <option value='elem_3'>elem 3</option>
      <option value='elem_4'>elem 4</option>
      ...
      <option value='elem_100'>elem 100</option>
    </select>
    <script src="path/to/jquery.select-multiple.js" type="text/javascript"></script>
  </body>
</html>
```

### JavaScript

```javascript
$('#my-select').selectMultiple()

Options
| Name               | type      | default               | description                                                          |
| ------------------ | --------- | --------------------- | -------------------------------------------------------------------- |
| afterInit          | function  | function(container){} | Function to call after the selectMultiple initilization.             |
| afterSelect        | function  | function(values){}    | Function to call after one item is selected.                         |
| afterDeselect      | function  | function(values){}    | Function to call after one item is deselected.                       |
| selectableHeader   | HTML/Text | null                  | Text or HTML to display in the selectable header.                    |
| selectableFooter   | HTML/Text | null                  | Text or HTML to display in the selectable footer.                    |
| disabledClass      | String    | 'disabled'            | CSS class for disabled items.                                        |
| selectableOptgroup | Boolean   | false                 | Click on optgroup will select all nested options when set to true.   |
| dblClick           | Boolean   | false                 | Replace the defautl click event to select items by the dblclick one. |
| cssClass           | String    | ""                    | Add a custom CSS class to the selectmultiple container.              |

### Methods

.selectMultiple(options)<commit_msg>solves bug in markdown preview<commit_after>
# jquery.select-multiple.js

This is an awesome user-friendlier drop-in replacement for the standard <select> with multiple attribute activated.

# Features
    - Free (under MIT license)
    - Works in an unobtrusive fashion
    - Fully open sourced
    - Keyboard support
    - Provides some callbacks
    - Fully customizable via CSS
    - Depends on jQuery 1.8+
    - Tiny code ~8kb minified
    - [https://github.com/krazedkrish/select-multiple-rails](gem for Rails)

# Usage

### HTML

```html
<html>
  <head>
    <link href="path/to/select-multiple.css" media="screen" rel="stylesheet" type="text/css">
  </head>
  <body>
    <select multiple="multiple" id="my-select" name="my-select[]">
      <option value='elem_1'>elem 1</option>
      <option value='elem_2'>elem 2</option>
      <option value='elem_3'>elem 3</option>
      <option value='elem_4'>elem 4</option>
      ...
      <option value='elem_100'>elem 100</option>
    </select>
    <script src="path/to/jquery.select-multiple.js" type="text/javascript"></script>
  </body>
</html>
```

### JavaScript

```javascript
$('#my-select').selectMultiple()
```

### Options

| Name               | type      | default               | description                                                          |
| ------------------ | --------- | --------------------- | -------------------------------------------------------------------- |
| afterInit          | function  | function(container){} | Function to call after the selectMultiple initilization.             |
| afterSelect        | function  | function(values){}    | Function to call after one item is selected.                         |
| afterDeselect      | function  | function(values){}    | Function to call after one item is deselected.                       |
| selectableHeader   | HTML/Text | null                  | Text or HTML to display in the selectable header.                    |
| selectableFooter   | HTML/Text | null                  | Text or HTML to display in the selectable footer.                    |
| disabledClass      | String    | 'disabled'            | CSS class for disabled items.                                        |
| selectableOptgroup | Boolean   | false                 | Click on optgroup will select all nested options when set to true.   |
| dblClick           | Boolean   | false                 | Replace the defautl click event to select items by the dblclick one. |
| cssClass           | String    | ""                    | Add a custom CSS class to the selectmultiple container.              |

### Methods

```javascript
.selectMultiple(options)
{'fraction_non_alphanumeric': 0.14577424844015882, 'fraction_numerical': 0.00642843637738703, 'mean_word_length': 1.72119341563786, 'pattern_counts': {'":': 0, '<': 47, '<?xml version=': 0, '>': 47, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5237321', 'n_tokens_mistral': 1369, 'n_tokens_neox': 1303, 'n_words': 408}