Title: JS Scripts
Last modified: August 27, 2020

---

# JS Scripts

 *  Resolved [TableauxAdmin](https://wordpress.org/support/users/tableauxadmin/)
 * (@tableauxadmin)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/js-scripts/)
 * So you can’t run any js scripts in AMP validated pages? That means any page that
   uses a js script to render images in a gallery will not work well, or not work
   at all.
 * Images are a major part of our website and they were displaying fine until the
   last AMP update. Now the plugin has made it where all the images in my galleries
   are semi-transparent on mobile, I assume because because the js script cannot
   run. I deactivated AMP and my galleries display as expected on mobile.
 * Is there a workaround for this?

Viewing 5 replies - 1 through 5 (of 5 total)

 *  [James Osborne](https://wordpress.org/support/users/jamesosborne/)
 * (@jamesosborne)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/js-scripts/#post-13324702)
 * Custom JavaScript in the traditional sense is restricted in AMP although you 
   can use the [amp-script](https://amp.dev/documentation/components/amp-script/)
   component. The restriction is an AMP framework principle for performance reasons.
 * If you’d like to share the gallery plugin you are using I’d be happy to investigate,
   in particular as you mentioned it was working previously.
 * The native WordPress gallery block also works in AMP.
 *  Thread Starter [TableauxAdmin](https://wordpress.org/support/users/tableauxadmin/)
 * (@tableauxadmin)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/js-scripts/#post-13324828)
 * The plugin I am using is [https://justifiedgrid.com/](https://justifiedgrid.com/).
   I’ve been using this paid version on our sites for some time with no issues on
   desktop or mobile. As a matter of fact, I chose this particular plugin because
   it worked so well on mobile.
 * Here is a screencap of the AMP results I got before disabling:
    [https://tableaux.com/files/images/jig-AMP-screencap.jpg](https://tableaux.com/files/images/jig-AMP-screencap.jpg)
 * We use it on several galleries but here is one you can look at [https://tableauxhospitality.com/lookbook/](https://tableauxhospitality.com/lookbook/)
   Right now I have AMP disabled and all the images display as expected. If I activate
   AMP, the images display semi-transparent.
 * That Justified Image Grid plugin depends on JS, it cannot be replaced with anything
   meaningful without JS.
 *  Plugin Author [Weston Ruter](https://wordpress.org/support/users/westonruter/)
 * (@westonruter)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/js-scripts/#post-13324891)
 * If you require that custom JS functionality on that page and there isn’t a good
   AMP-compatible alternative, you can just disable AMP for that one page. You can
   find an “AMP Enabled” toggle when you edit the page.
 *  Thread Starter [TableauxAdmin](https://wordpress.org/support/users/tableauxadmin/)
 * (@tableauxadmin)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/js-scripts/#post-13324959)
 * OK, well that helps a little. But google won’t like those pages.
 *  Plugin Author [Weston Ruter](https://wordpress.org/support/users/westonruter/)
 * (@westonruter)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/js-scripts/#post-13325392)
 * If you want to go AMP-first, we have a newly-revamped plugin site with documentation:
   [https://amp-wp.org/](https://amp-wp.org/)
 * There is an ecosystem section that has themes and plugins which are AMP-compatible.
   Jetpack is not yet listed there, but it is mostly now AMP-compatible. It has 
   some grid layouts that are similar to what you have on your site.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘JS Scripts’ is closed to new replies.

 * ![](https://ps.w.org/amp/assets/icon.svg?rev=2527602)
 * [AMP](https://wordpress.org/plugins/amp/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/amp/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/amp/)
 * [Active Topics](https://wordpress.org/support/plugin/amp/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/amp/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/amp/reviews/)

 * 5 replies
 * 3 participants
 * Last reply from: [Weston Ruter](https://wordpress.org/support/users/westonruter/)
 * Last activity: [5 years, 9 months ago](https://wordpress.org/support/topic/js-scripts/#post-13325392)
 * Status: resolved