My Project
 All Data Structures Namespaces Functions Variables
Public Member Functions | Data Fields
CI_Javascript Class Reference
Inheritance diagram for CI_Javascript:
CI_Jquery

Public Member Functions

 __construct ($params=array())
 
 blur ($element= 'this', $js= '')
 
 change ($element= 'this', $js= '')
 
 click ($element= 'this', $js= '', $ret_false=TRUE)
 
 dblclick ($element= 'this', $js= '')
 
 error ($element= 'this', $js= '')
 
 focus ($element= 'this', $js= '')
 
 hover ($element= 'this', $over, $out)
 
 keydown ($element= 'this', $js= '')
 
 keyup ($element= 'this', $js= '')
 
 load ($element= 'this', $js= '')
 
 mousedown ($element= 'this', $js= '')
 
 mouseout ($element= 'this', $js= '')
 
 mouseover ($element= 'this', $js= '')
 
 mouseup ($element= 'this', $js= '')
 
 output ($js)
 
 ready ($js)
 
 resize ($element= 'this', $js= '')
 
 scroll ($element= 'this', $js= '')
 
 unload ($element= 'this', $js= '')
 
 addClass ($element= 'this', $class= '')
 
 animate ($element= 'this', $params=array(), $speed= '', $extra= '')
 
 fadeIn ($element= 'this', $speed= '', $callback= '')
 
 fadeOut ($element= 'this', $speed= '', $callback= '')
 
 slideUp ($element= 'this', $speed= '', $callback= '')
 
 removeClass ($element= 'this', $class= '')
 
 slideDown ($element= 'this', $speed= '', $callback= '')
 
 slideToggle ($element= 'this', $speed= '', $callback= '')
 
 hide ($element= 'this', $speed= '', $callback= '')
 
 toggle ($element= 'this')
 
 toggleClass ($element= 'this', $class='')
 
 show ($element= 'this', $speed= '', $callback= '')
 
 compile ($view_var= 'script_foot', $script_tags=TRUE)
 
 clear_compile ()
 
 external ($external_file= '', $relative=FALSE)
 
 inline ($script, $cdata=TRUE)
 
 _open_script ($src= '')
 
 _close_script ($extra="\n")
 
 update ($element= 'this', $speed= '', $callback= '')
 
 generate_json ($result=NULL, $match_array_type=FALSE)
 
 _is_associative_array ($arr)
 
 _prep_args ($result, $is_key=FALSE)
 

Data Fields

 $_javascript_location = 'js'
 

Member Function Documentation

_close_script (   $extra = "\n")

Close Script

Outputs an closing </script>

private

Parameters
string
Returns
string
_is_associative_array (   $arr)

Is associative array

Checks for an associative array

public

Parameters
type
Returns
type
_open_script (   $src = '')

Open Script

Outputs an opening <script>

private

Parameters
string
Returns
string
_prep_args (   $result,
  $is_key = FALSE 
)

Prep Args

Ensures a standard json value and escapes values

public

Parameters
type
Returns
type
addClass (   $element = 'this',
  $class = '' 
)

Add Class

Outputs a javascript library addClass event

public

Parameters
string- element
string- Class to add
Returns
string
animate (   $element = 'this',
  $params = array(),
  $speed = '',
  $extra = '' 
)

Animate

Outputs a javascript library animate event

public

Parameters
string- element
string- One of 'slow', 'normal', 'fast', or time in milliseconds
string- Javascript callback function
Returns
string
blur (   $element = 'this',
  $js = '' 
)

Blur

Outputs a javascript library blur event

public

Parameters
stringThe element to attach the event to
stringThe code to execute
Returns
string
change (   $element = 'this',
  $js = '' 
)

Change

Outputs a javascript library change event

public

Parameters
stringThe element to attach the event to
stringThe code to execute
Returns
string
clear_compile ( )

Clear Compile

Clears any previous javascript collected for output

public

Returns
void
click (   $element = 'this',
  $js = '',
  $ret_false = TRUE 
)

Click

Outputs a javascript library click event

public

Parameters
stringThe element to attach the event to
stringThe code to execute
booleanwhether or not to return false
Returns
string
compile (   $view_var = 'script_foot',
  $script_tags = TRUE 
)

Compile

gather together all script needing to be output

public

Parameters
stringThe element to attach the event to
Returns
string
dblclick (   $element = 'this',
  $js = '' 
)

Double Click

Outputs a javascript library dblclick event

public

Parameters
stringThe element to attach the event to
stringThe code to execute
Returns
string
error (   $element = 'this',
  $js = '' 
)

Error

Outputs a javascript library error event

public

Parameters
stringThe element to attach the event to
stringThe code to execute
Returns
string
external (   $external_file = '',
  $relative = FALSE 
)

External

Outputs a <script> tag with the source as an external js file

public

Parameters
stringThe element to attach the event to
Returns
string
fadeIn (   $element = 'this',
  $speed = '',
  $callback = '' 
)

Fade In

Outputs a javascript library hide event

public

Parameters
string- element
string- One of 'slow', 'normal', 'fast', or time in milliseconds
string- Javascript callback function
Returns
string
fadeOut (   $element = 'this',
  $speed = '',
  $callback = '' 
)

Fade Out

Outputs a javascript library hide event

public

Parameters
string- element
string- One of 'slow', 'normal', 'fast', or time in milliseconds
string- Javascript callback function
Returns
string
focus (   $element = 'this',
  $js = '' 
)

Focus

Outputs a javascript library focus event

public

Parameters
stringThe element to attach the event to
stringThe code to execute
Returns
string
generate_json (   $result = NULL,
  $match_array_type = FALSE 
)

Generate JSON

Can be passed a database result or associative array and returns a JSON formatted string

Parameters
mixedresult set or array
boolmatch array types (defaults to objects)
Returns
string a json formatted string
hide (   $element = 'this',
  $speed = '',
  $callback = '' 
)

Hide

Outputs a javascript library hide action

public

Parameters
string- element
string- One of 'slow', 'normal', 'fast', or time in milliseconds
string- Javascript callback function
Returns
string
hover (   $element = 'this',
  $over,
  $out 
)

Hover

Outputs a javascript library hover event

public

Parameters
string- element
string- Javascript code for mouse over
string- Javascript code for mouse out
Returns
string
inline (   $script,
  $cdata = TRUE 
)

Inline

Outputs a <script> tag

public

Parameters
stringThe element to attach the event to
booleanIf a CDATA section should be added
Returns
string
keydown (   $element = 'this',
  $js = '' 
)

Keydown

Outputs a javascript library keydown event

public

Parameters
stringThe element to attach the event to
stringThe code to execute
Returns
string
keyup (   $element = 'this',
  $js = '' 
)

Keyup

Outputs a javascript library keydown event

public

Parameters
stringThe element to attach the event to
stringThe code to execute
Returns
string
load (   $element = 'this',
  $js = '' 
)

Load

Outputs a javascript library load event

public

Parameters
stringThe element to attach the event to
stringThe code to execute
Returns
string
mousedown (   $element = 'this',
  $js = '' 
)

Mousedown

Outputs a javascript library mousedown event

public

Parameters
stringThe element to attach the event to
stringThe code to execute
Returns
string
mouseout (   $element = 'this',
  $js = '' 
)

Mouse Out

Outputs a javascript library mouseout event

public

Parameters
stringThe element to attach the event to
stringThe code to execute
Returns
string
mouseover (   $element = 'this',
  $js = '' 
)

Mouse Over

Outputs a javascript library mouseover event

public

Parameters
stringThe element to attach the event to
stringThe code to execute
Returns
string
mouseup (   $element = 'this',
  $js = '' 
)

Mouseup

Outputs a javascript library mouseup event

public

Parameters
stringThe element to attach the event to
stringThe code to execute
Returns
string
output (   $js)

Output

Outputs the called javascript to the screen

public

Parameters
stringThe code to output
Returns
string
ready (   $js)

Ready

Outputs a javascript library mouseup event

public

Parameters
stringThe element to attach the event to
stringThe code to execute
Returns
string
removeClass (   $element = 'this',
  $class = '' 
)

Remove Class

Outputs a javascript library removeClass event

public

Parameters
string- element
string- Class to add
Returns
string
resize (   $element = 'this',
  $js = '' 
)

Resize

Outputs a javascript library resize event

public

Parameters
stringThe element to attach the event to
stringThe code to execute
Returns
string
scroll (   $element = 'this',
  $js = '' 
)

Scroll

Outputs a javascript library scroll event

public

Parameters
stringThe element to attach the event to
stringThe code to execute
Returns
string
show (   $element = 'this',
  $speed = '',
  $callback = '' 
)

Show

Outputs a javascript library show event

public

Parameters
string- element
string- One of 'slow', 'normal', 'fast', or time in milliseconds
string- Javascript callback function
Returns
string
slideDown (   $element = 'this',
  $speed = '',
  $callback = '' 
)

Slide Down

Outputs a javascript library slideDown event

public

Parameters
string- element
string- One of 'slow', 'normal', 'fast', or time in milliseconds
string- Javascript callback function
Returns
string
slideToggle (   $element = 'this',
  $speed = '',
  $callback = '' 
)

Slide Toggle

Outputs a javascript library slideToggle event

public

Parameters
string- element
string- One of 'slow', 'normal', 'fast', or time in milliseconds
string- Javascript callback function
Returns
string
slideUp (   $element = 'this',
  $speed = '',
  $callback = '' 
)

Slide Up

Outputs a javascript library slideUp event

public

Parameters
string- element
string- One of 'slow', 'normal', 'fast', or time in milliseconds
string- Javascript callback function
Returns
string
toggle (   $element = 'this')

Toggle

Outputs a javascript library toggle event

public

Parameters
string- element
Returns
string
toggleClass (   $element = 'this',
  $class = '' 
)

Toggle Class

Outputs a javascript library toggle class event

public

Parameters
string- element
Returns
string
unload (   $element = 'this',
  $js = '' 
)

Unload

Outputs a javascript library unload event

public

Parameters
stringThe element to attach the event to
stringThe code to execute
Returns
string
update (   $element = 'this',
  $speed = '',
  $callback = '' 
)

Update

Outputs a javascript library slideDown event

public

Parameters
string- element
string- One of 'slow', 'normal', 'fast', or time in milliseconds
string- Javascript callback function
Returns
string

The documentation for this class was generated from the following file: