What is the best way how to add jquery code by Joomla plugin?
How can I set that these code should be applied just for checkout page of VirtueMart in xml file?
Is this the best way?
<?php
// no direct access
defined('_JEXEC') or die;
class plgContentHelloworld extends JPlugin
{
public function onAfterRender() {
echo '<script>';
echo 'alert("Hello World!");';
echo '</script>';
}
}
?>