# Namespace: jQuery

## jQuery

Source:
  - jquery.position.js, line 25

### Methods

#### <static> addPositionType(type, option)

  Add or replace position type rules for auto positioning. Does not fully determinated with parameters yet, only draft version.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `type` | string | name of position rules
  `option` | object | options of position rules

  Source:
    - jquery.position.js, line 129

#### setPosition(source, params) → {jQuery}

  Place DOM element relative to another element or using position parameters. Elements with style.display='none' also supported.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `source` | object | object that provides information about new position. accepts: jQuery selector or object object with id: `{id:'myDiv'}` object with region settings: `{left:0, top:0, width:100, height:100}` DOM Element Event object
  `params` | object | position parameters: ###### Properties
  Name | Type | Argument | Description
  --- | --- | --- | ---
  `type` | string | <optional> | position type that defines positioning and auto positioning rules ["TOOLTIP","DROPDOWN"]
  `collision` | string | <optional> | not implemented yet

`offset`
array
<optional>
provides array(2) with x and y for manually position definition
affects only if "type", "from" and "to" not defined
`from`
string
<optional>
place target relative of source // draft definition
`to`
string
<optional>
direction for target // draft definition

Source:
  - jquery.position.js, line 35

##### Returns:

jQuery wrapped DOM elements

Type
  jQuery

##### Examples

     jQuery('#tooltip').setPosition('#myDiv',{from:'LB', to:'AA'});

     jQuery('#myClickDiv').bind("click",function(e){jQuery('#tooltip').setPosition(e);});