Joomla 3.8 and JQuery - Does not work

0

Hello! I looked at everything that was singing and did not find a step by step how to use JQuery in Joomla 3.8. I'm creating a module and I'd like to use JQuery.

I did it here:

1 - download jquery-3.3.1.js and put it in the folder: / modules / mod_mymodule / js

  • Reading the Joomla documentation, I've added the following lines to my modules / mod_mymodule / mod_mymodule.php file:

    JHtml::script(JURI::base() . 'js/jquery-3.3.1.js');
    Jhtml::_('jquery.framework');
    Jhtml::_('jquery.ui');
    
  • At the bottom of the page of my default.php file I added this:

    <?php
    $document = JFactory::getDocument();
    $document->addScriptDeclaration('
        window.event("domready", function() {
            alert("An inline JavaScript Declaration");
        });
    ');
    ?>
    
  • Should display an alert window when the page loads but does not work. What am I doing wrong?

        
    asked by anonymous 25.07.2018 / 15:11

    0 answers