# Class: Draggable

## RichFaces.ui. Draggable

#### new Draggable(id, options)

Backing object for rich:dragSource

##### Parameters:

Name | Type | Description
--- | --- | ---
`id` |  |
`options` |  |

Source:
  - dnd-draggable.js, line 29

### Extends

- RichFaces.BaseNonVisualComponent

### Methods

#### attachToDom(source) → {DOMElement}

Attach component object to DOM element by component id, DOM element or jQuery object and returns the element Its required for the client side API calls and to clean up after ajax request or document unload by calling destroy method

##### Parameters:

Name | Type | Description
--- | --- | ---
`source` | string | DOMElement | jQuery | component id, DOM element or DOM elements wrapped by jQuery

Inherited From:
  - RichFaces.BaseNonVisualComponent#attachToDom
Source:
  - richfaces-base-component.js, line 363

##### Returns:

Type
  DOMElement

#### destroy()

Destroy method. Will be called before remove component from the page

Inherited From:
  - RichFaces.BaseNonVisualComponent#destroy
Source:
  - richfaces-base-component.js, line 400

#### detach(source)

Detach component object from DOM element by component id, DOM element or jQuery object

##### Parameters:

Name | Type | Description
--- | --- | ---
`source` | string | DOMElement | jQuery | component id, DOM element or DOM elements wrapped by jQuery

Inherited From:
  - RichFaces.BaseNonVisualComponent#detach
Source:
  - richfaces-base-component.js, line 386