AnsweredAssumed Answered

Problem adding JQuery in ftl file

Question asked by ayushi.agrahari on May 19, 2018
Latest reply on May 30, 2018 by jpotts

Hi all,

 

I am trying to print a simple alert in login.get.html.ftl file using JQuery.So,I have added the following code

 

<@markup id="js">
   <#-- JavaScript Dependencies -->
   <@script src="${url.context}/res/components/guest/login.js" group="login"/>
    <script type="text/javascript">
      $(document).ready(function () {
        alert('This is login page');
        });
   </script>
</@>

 

But the alert is not working.plz guide me if I am missing anything.

 

Thanks and Best Regards

Ayushi Agrahari

Outcomes