From 1cf11491794573b20fc496045a36e4f3d9e906dc Mon Sep 17 00:00:00 2001 From: Derek Jones Date: Thu, 11 Mar 2010 09:39:11 -0600 Subject: got rid of some redundancy in the preliminary jQuery lib docs --- user_guide/libraries/javascript.html | 94 +----------------------------------- 1 file changed, 2 insertions(+), 92 deletions(-) (limited to 'user_guide') diff --git a/user_guide/libraries/javascript.html b/user_guide/libraries/javascript.html index 2856fdbf3..08982fd08 100644 --- a/user_guide/libraries/javascript.html +++ b/user_guide/libraries/javascript.html @@ -84,98 +84,8 @@ Input and Security Class

$config['javascript_location'] = 'http://localhost/codeigniter/themes/js/jquery/');
$config['javascript_ajax_img'] = 'images/ajax-loader.gif';

If you keep your files in the same directories they were downloaded from, then you need not set this configuration items.

-

Events

-

Events are set using the following syntax.

-

$this->jquery->event('element_path', code_to_run());

-

In the above example:

- -

Effects

-

The query library supports a powerful effects repertoire.

-

hide() / show()

-

Each of this functions will affect the visibility of an item on your page. hide() will set an item invisible, show() will reveal it.

-

$this->jquery->hide(target, optional speed, optional extra information);
- $this->jquery->show(target, optional speed, optional extra information);

- -

toggle()

-

toggle() will change the visibility of an item to the opposite of its current state, hiding visible elements, and revealing hidden ones.

-

$this->jquery->toggle(target);

- -

animate()

-

$this->jquery->animate(target, parameters, optional speed, optional extra information);

- -

For a full summary, see http://docs.jquery.com/Effects/animate

-

Here is an example of an animate() called on a div with an id of "note", and triggered by a click using the jQuery library's click() event.

-

$params = array(
- 'height' => 80,
- 'width' => '50%',
- 'marginLeft' => 125
-);
-$this->jquery->click('#trigger', $this->jquery->animate('#note', $params, normal));

-

fadeIn() / fadeOut()

-

$this->jquery->fadeIn(target, optional speed, optional extra information);
- $this->jquery->fadeOut(target, optional speed, optional extra information);

- -

toggleClass()

-

This function will add or remove a CSS class to its target.

-

$this->jquery->toggleClass(target, class)

- -

fadeIn() / fadeOut()

-

These effects cause an element(s) to disappear or reappear over time.

-

$this->jquery->fadeIn(target, optional speed, optional extra information);
- $this->jquery->fadeOut(target, optional speed, optional extra information);

- -

slideUp() / slideDown() / slideToggle()

-

These effects cause an element(s) to slide.

-

$this->jquery->slideUp(target, optional speed, optional extra information);
- $this->jquery->slideDown(target, optional speed, optional extra information);
-$this->jquery->slideToggle(target, optional speed, optional extra information);

- -

Plugins

-

Some select jQuery plugins are made available using this library.

-

corner()

-

Used to add distinct corners to page elements. For full details see http://www.malsup.com/jquery/corner/

-

$this->jquery->corner(target, corner_style);

- -

$this->jquery->corner("#note", "cool tl br");

-

tablesorter()

-

description to come

-

modal()

-

description to come

-

calendar()

-

description to come

+ +

For information on outputting events, effects, etc., refer to the jQuery Class documentation.

-- cgit v1.2.3-24-g4f1b