0

I have found issue related to full page cache enable. I am not able to remove the label on document ready in magento2

<script type="text/javascript">

    require(['jquery'], function ($) 
    {
        $(document).ready(function () 
        {
            $("label:contains('Please type captcha here')").remove();
        })
    });
</script>

jQuery not working with full page cache

  • try to use this : <script type="text/x-magento-init"> instead of this: <script type="text/javascript"> – Jimit Bhavsar Dec 7 '18 at 7:00
  • you can also use timeout function to hide above message after few seconds – Jimit Bhavsar Dec 7 '18 at 7:02
  • you can flush & refresh the cache after putting this script in your html – Himanshu Dec 7 '18 at 7:07
  • @JimitBhavsar I tried both solution but still not working – Parthavi Dec 7 '18 at 7:14
  • you can use ajax function, you have to create one file in root folder and put your script in that file and call that file using ajax request – Jimit Bhavsar Dec 7 '18 at 7:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.