Basic JS insertion successfully done
This commit is contained in:
parent
e3008b8789
commit
9cef15b4f5
8
src/admin/res/clubs.js
Normal file
8
src/admin/res/clubs.js
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
|
||||||
|
jQuery(function($){
|
||||||
|
$('#mya').click(function()
|
||||||
|
{
|
||||||
|
//alert("a");
|
||||||
|
console.log("a");
|
||||||
|
});
|
||||||
|
});
|
@ -19,4 +19,6 @@ Place: <?php echo $place->getName(); ?><br>
|
|||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
|
|
||||||
<h1>Output</h1>
|
<h1>Output</h1>
|
||||||
<pre><?php print_r($this->log); ?></pre>
|
<pre><?php print_r($this->log); ?></pre>
|
||||||
|
|
||||||
|
<a href='#' id='mya'>Test Link</a>
|
||||||
|
@ -4,3 +4,5 @@
|
|||||||
defined('_JEXEC') or die;
|
defined('_JEXEC') or die;
|
||||||
|
|
||||||
// Append &layout=foo to URL
|
// Append &layout=foo to URL
|
||||||
|
?>
|
||||||
|
<p>This is foo.</p>
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
use Joomla\CMS\Toolbar\ToolbarHelper;
|
use Joomla\CMS\Toolbar\ToolbarHelper;
|
||||||
use Joomla\CMS\MVC\View\HtmlView;
|
use Joomla\CMS\MVC\View\HtmlView;
|
||||||
|
use Joomla\CMS\Factory;
|
||||||
|
|
||||||
// No direct access.
|
// No direct access.
|
||||||
defined('_JEXEC') or die;
|
defined('_JEXEC') or die;
|
||||||
@ -44,6 +45,10 @@ class ClubsViewTest extends HtmlView
|
|||||||
$this->log = $np;
|
$this->log = $np;
|
||||||
|
|
||||||
parent::display($tpl);
|
parent::display($tpl);
|
||||||
|
//Factory::getDocument()->addScript( "http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" );
|
||||||
|
JHtmlJquery::framework();
|
||||||
|
Factory::getDocument()->addScript('components/com_clubs/res/clubs.js');
|
||||||
|
//jexit();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function getViewName()
|
protected function getViewName()
|
||||||
|
Loading…
Reference in New Issue
Block a user