public function addJavaScriptMethod($jsObject, $jsMethod, $jsSource, $jsParameters = "")
	{
		$jsEventSource = 
			"$(function() { \n" . 
			"	$('$jsObject').$jsMethod(function($jsParameters) { \n" .
			"		$jsSource \n" .
			"	}); \n" .
			"});\n\n";
		$this->addJavaScriptSource($jsEventSource, false);
	}
public function addJavaScriptMethod($jsObject, $jsMethod, $jsSource, $jsParameters = "")
	{
		$jsEventSource = 
			"$(function() { \n" . 
			"	$('$jsObject').$jsMethod(function($jsParameters) { \n" .
			"		$jsSource \n" .
			"	}); \n" .
			"});\n\n";
		$this->addJavaScriptSource($jsEventSource, false);
	}
public function addJavaScriptMethod ( $ jsObject , $ jsMethod , $ jsSource , $ jsParameters = "" ) { $ jsEventSource = "$(function() { \n" . "	$('$jsObject').$jsMethod(function($jsParameters) { \n" . "		$jsSource \n" . "	}); \n" . "});\n\n" ; $ this -> addJavaScriptSource ( $ jsEventSource , false ) ; }
Add a JavaScript method to a JavaScript object.

Some examples:

addJavaScriptMethod("a", "click", "alert('clicked on a hiperlink');");
addJavaScriptMethod("#myID", "blur", "alert('blur a ID object in JavaScript');");

@param string $jsObject
@param string $jsMethod
@param string $jsSource
@param string $jsParameters
@return void
Add a JavaScript method to a JavaScript object .