'Why won't my ImageMapster jquery plugin work in Power Apps portal code editor?

I am trying to apply some hover effects to my image map that I have coded inside my power apps portal site via the code editor.

When I try to add in this method: <script type="text/javascript">$('img').mapster();</script> which sets up the styling I want, the code editor saves it as: <script type="text/javascript">$( & #039;img&# 039;).mapster();</script> and the jquery is not working on the page.

What do those numbers mean? Why is Power Apps adding those numbers in and is there another way to reference the image map perhaps? Any advice is appreciated.



Solution 1:[1]

please add this line

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.js"> 
</script>

next append this

<script type="text/javascript">

     $(document).ready(function () {
     $( & #039;img&# 039;).mapster();
  });

</script>

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 vahid asghari