Class CI_Jquery - echiong/testRepo GitHub Wiki

##Class CI_Jquery

Jquery Class

Package: [[CodeIgniter<a href="Package CodeIgniter.Libraries.md">Libraries]]
Category: Loader
Author: ExpressionEngine Dev Team
Link: http://www.codeigniter.com/user_guide/libraries/javascript.html
Located at system/libraries/javascript/Jquery.php

##Methods summary


public __construct ( mixed $params )

###Overrides CI_Javascript::__construct()


public string _blur ( string $element = 'this', string $js = '' )

Blur

Outputs a jQuery blur event

Parameters

$element string
The element to attach the event to

$js string
The code to execute

Returns string


public string _change ( string $element = 'this', string $js = '' )

Change

Outputs a jQuery change event

Parameters

$element string
The element to attach the event to

$js string
The code to execute

Returns string


public string _click ( string $element = 'this', string $js = '', boolean $ret_false = TRUE )

Click

Outputs a jQuery click event

Parameters

$element string
The element to attach the event to

$js string
The code to execute

$ret_false boolean
whether or not to return false

Returns string


public string _dblclick ( string $element = 'this', string $js = '' )

Double Click

Outputs a jQuery dblclick event

Parameters

$element string
The element to attach the event to

$js string
The code to execute

Returns string


public string _error ( string $element = 'this', string $js = '' )

Error

Outputs a jQuery error event

Parameters

$element string
The element to attach the event to

$js string
The code to execute

Returns string


public string _focus ( string $element = 'this', string $js = '' )

Focus

Outputs a jQuery focus event

Parameters

$element string
The element to attach the event to

$js string
The code to execute

Returns string


public string _hover ( string $element = 'this', string $over, string $out )

Hover

Outputs a jQuery hover event

Parameters

$element string
- element

$over string
- Javascript code for mouse over

$out string
- Javascript code for mouse out

Returns string


public string _keydown ( string $element = 'this', string $js = '' )

Keydown

Outputs a jQuery keydown event

Parameters

$element string
The element to attach the event to

$js string
The code to execute

Returns string


public string _keyup ( string $element = 'this', string $js = '' )

Keyup

Outputs a jQuery keydown event

Parameters

$element string
The element to attach the event to

$js string
The code to execute

Returns string


public string _load ( string $element = 'this', string $js = '' )

Load

Outputs a jQuery load event

Parameters

$element string
The element to attach the event to

$js string
The code to execute

Returns string


public string _mousedown ( string $element = 'this', string $js = '' )

Mousedown

Outputs a jQuery mousedown event

Parameters

$element string
The element to attach the event to

$js string
The code to execute

Returns string


public string _mouseout ( string $element = 'this', string $js = '' )

Mouse Out

Outputs a jQuery mouseout event

Parameters

$element string
The element to attach the event to

$js string
The code to execute

Returns string


public string _mouseover ( string $element = 'this', string $js = '' )

Mouse Over

Outputs a jQuery mouseover event

Parameters

$element string
The element to attach the event to

$js string
The code to execute

Returns string


public string _mouseup ( string $element = 'this', string $js = '' )

Mouseup

Outputs a jQuery mouseup event

Parameters

$element string
The element to attach the event to

$js string
The code to execute

Returns string


public string _output ( string $array_js = '' )

Output

Outputs script directly

Parameters

$array_js string
The element to attach the event to

Returns string


public string _resize ( string $element = 'this', string $js = '' )

Resize

Outputs a jQuery resize event

Parameters

$element string
The element to attach the event to

$js string
The code to execute

Returns string


public string _scroll ( string $element = 'this', string $js = '' )

Scroll

Outputs a jQuery scroll event

Parameters

$element string
The element to attach the event to

$js string
The code to execute

Returns string


public string _unload ( string $element = 'this', string $js = '' )

Unload

Outputs a jQuery unload event

Parameters

$element string
The element to attach the event to

$js string
The code to execute

Returns string


public string _addClass ( string $element = 'this', mixed $class = '' )

Add Class

Outputs a jQuery addClass event

Parameters

$element string
- element

$class

Returns string


public string _animate ( string $element = 'this', string $params = array(), string $speed = '', mixed $extra = '' )

Animate

Outputs a jQuery animate event

Parameters

$element string
- element

$params string
- One of 'slow', 'normal', 'fast', or time in milliseconds

$speed string
- Javascript callback function

$extra

Returns string


public string _fadeIn ( string $element = 'this', string $speed = '', string $callback = '' )

Fade In

Outputs a jQuery hide event

Parameters

$element string
- element

$speed string
- One of 'slow', 'normal', 'fast', or time in milliseconds

$callback string
- Javascript callback function

Returns string


public string _fadeOut ( string $element = 'this', string $speed = '', string $callback = '' )

Fade Out

Outputs a jQuery hide event

Parameters

$element string
- element

$speed string
- One of 'slow', 'normal', 'fast', or time in milliseconds

$callback string
- Javascript callback function

Returns string


public string _hide ( string $element = 'this', string $speed = '', string $callback = '' )

Hide

Outputs a jQuery hide action

Parameters

$element string
- element

$speed string
- One of 'slow', 'normal', 'fast', or time in milliseconds

$callback string
- Javascript callback function

Returns string


public string _removeClass ( string $element = 'this', mixed $class = '' )

Remove Class

Outputs a jQuery remove class event

Parameters

$element string
- element

$class

Returns string


public string _slideUp ( string $element = 'this', string $speed = '', string $callback = '' )

Slide Up

Outputs a jQuery slideUp event

Parameters

$element string
- element

$speed string
- One of 'slow', 'normal', 'fast', or time in milliseconds

$callback string
- Javascript callback function

Returns string


public string _slideDown ( string $element = 'this', string $speed = '', string $callback = '' )

Slide Down

Outputs a jQuery slideDown event

Parameters

$element string
- element

$speed string
- One of 'slow', 'normal', 'fast', or time in milliseconds

$callback string
- Javascript callback function

Returns string


public string _slideToggle ( string $element = 'this', string $speed = '', string $callback = '' )

Slide Toggle

Outputs a jQuery slideToggle event

Parameters

$element string
- element

$speed string
- One of 'slow', 'normal', 'fast', or time in milliseconds

$callback string
- Javascript callback function

Returns string


public string _toggle ( string $element = 'this' )

Toggle

Outputs a jQuery toggle event

Parameters

$element string
- element

Returns string


public string _toggleClass ( string $element = 'this', mixed $class = '' )

Toggle Class

Outputs a jQuery toggle class event

Parameters

$element string
- element

$class

Returns string


public string _show ( string $element = 'this', string $speed = '', string $callback = '' )

Show

Outputs a jQuery show event

Parameters

$element string
- element

$speed string
- One of 'slow', 'normal', 'fast', or time in milliseconds

$callback string
- Javascript callback function

Returns string


public string _updater ( string $container = 'this', string $controller, string $options = '' )

Updater

An Ajax call that populates the designated DOM node with returned content

Parameters

$container string
The element to attach the event to

$controller string
the controller to run the call against

$options string
optional parameters

Returns string


public string _zebraTables ( string $class = '', string $odd = 'odd', mixed $hover = '' )

Zebra tables

Parameters

$class string
table name

$odd string
plugin location

$hover

Returns string


public string corner ( string $element = '', mixed $corner_style = '' )

Corner Plugin

http://www.malsup.com/jquery/corner/

Parameters

$element string
target

$corner_style

Returns string


public modal ( mixed $src, mixed $relative = FALSE )

modal window

Load a thickbox modal window


public effect ( mixed $src, mixed $relative = FALSE )

Effect

Load an Effect library


public plugin ( mixed $src, mixed $relative = FALSE )

Plugin

Load a plugin library


public ui ( mixed $src, mixed $relative = FALSE )

UI

Load a user interface library


public sortable ( mixed $element, mixed $options = array() )

Sortable

Creates a jQuery sortable


public string tablesorter ( string $table = '', string $options = '' )

Table Sorter Plugin

Parameters

$table string
table name

$options string
plugin location

Returns string


public string _add_event ( string $element, string $js, string $event )

Add Event

Constructs the syntax for an event, and adds to into the array for compilation

Parameters

$element string
The element to attach the event to

$js string
The code to execute

$event string
The event to pass

Returns string


public string _compile ( mixed $view_var = 'script_foot', mixed $script_tags = TRUE )

Compile

As events are specified, they are stored in an array This funciton compiles them all for output on a page

Returns string


public _clear_compile ( )

Clear Compile

Clears the array of script events collected for output


public string _document_ready ( mixed $js )

Document Ready

A wrapper for writing document.ready()

Returns string


public string script ( string $library_src = '', mixed $relative = FALSE )

Script Tag

Outputs the script tag that loads the jquery.js file into an HTML document

Parameters

$library_src string

$relative

Returns string


public string _prep_element ( string $element )

Prep Element

Puts HTML element in quotes for use in jQuery code unless the supplied element is the Javascript 'this' object, in which case no quotes are added

Parameters

$element string

Returns string


public string _validate_speed ( string $speed )

Validate Speed

Ensures the speed parameter is valid for jQuery

Parameters

$speed string

Returns string

Methods inherited from CI_Javascript

_close_script()

_is_associative_array()

_open_script()

_prep_args()

addClass()

animate()

blur()

change()

clear_compile()

click()

compile()

dblclick()

error()

external()

fadeIn()

fadeOut()

focus()

generate_json()

hide()

hover()

inline()

keydown()

keyup()

load()

mousedown()

mouseout()

mouseover()

mouseup()

output()

ready()

removeClass()

resize()

scroll()

show()

slideDown()

slideToggle()

slideUp()

toggle()

toggleClass()

unload()

update()

<table class="summary" id="properties">
<caption>Properties summary</caption>
<tr data-order="_javascript_folder" id="$_javascript_folder">
	<td class="attributes"><code>
		public  
		string
	</code></td>

	<td class="name">

$_javascript_folder

'js'
#
		<div class="description detailed">
			

		</div>
	</div></td>
</tr>
<tr data-order="jquery_code_for_load" id="$jquery_code_for_load">
	<td class="attributes"><code>
		public  
		array
	</code></td>

	<td class="name">

$jquery_code_for_load

array()
#
		<div class="description detailed">
			

		</div>
	</div></td>
</tr>
<tr data-order="jquery_code_for_compile" id="$jquery_code_for_compile">
	<td class="attributes"><code>
		public  
		array
	</code></td>

	<td class="name">

$jquery_code_for_compile

array()
#
		<div class="description detailed">
			

		</div>
	</div></td>
</tr>
<tr data-order="jquery_corner_active" id="$jquery_corner_active">
	<td class="attributes"><code>
		public  
		boolean
	</code></td>

	<td class="name">

$jquery_corner_active

FALSE
#
		<div class="description detailed">
			

		</div>
	</div></td>
</tr>
<tr data-order="jquery_table_sorter_active" id="$jquery_table_sorter_active">
	<td class="attributes"><code>
		public  
		boolean
	</code></td>

	<td class="name">

$jquery_table_sorter_active

FALSE
#
		<div class="description detailed">
			

		</div>
	</div></td>
</tr>
<tr data-order="jquery_table_sorter_pager_active" id="$jquery_table_sorter_pager_active">
	<td class="attributes"><code>
		public  
		boolean
	</code></td>

	<td class="name">

$jquery_table_sorter_pager_active

FALSE
#
		<div class="description detailed">
			

		</div>
	</div></td>
</tr>
<tr data-order="jquery_ajax_img" id="$jquery_ajax_img">
	<td class="attributes"><code>
		public  
		string
	</code></td>

	<td class="name">

$jquery_ajax_img

''
#
		<div class="description detailed">
			

		</div>
	</div></td>
</tr>
</table>

<table class="summary inherited">
<caption>Properties inherited from <a href="Class CI_Javascript.md#properties">CI_Javascript</a></caption>
<tr>
	<td><code>
		<a href="Class CI_Javascript.md#$_javascript_location"><var>$_javascript_location</var></a>
	</code></td>
</tr>
</table>
⚠️ **GitHub.com Fallback** ⚠️