Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $( function () {
- mw.loader.using( [ 'oojs-ui' ] ).done( function () {
- $( '.editCheckboxes input[type=checkbox]' ).each( function () {
- var checkboxWidget,
- $this = $( this ),
- id = $this.attr( 'id' );
- checkboxWidget = new OO.ui.CheckboxInputWidget( {
- name: $this.attr( 'name' ),
- tabIndex: Number($this.attr( 'tabindex' )),
- accessKey: $this.attr( 'accesskey' ),
- value: $this.attr( 'value' ),
- selected: this.checked
- } );
- checkboxWidget.$input.attr( 'id', id );
- checkboxWidget.$element.css( 'display', 'inline-block' );
- $this.replaceWith( checkboxWidget.$element );
- } );
- } );
- } );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement