Adding jQuery Code in the DMS Editor

Posted · Add Comment

If you’ve got a quick jQuery snippet you want to add to your site, you can just add it to the Custom Scripts part of the DMS Editor.

Here’s an example:

Adding jQuery Code to PageLines DMS Editor


Things to note in the screenshot’s code:

  • Wrap with <script> … </script> tags.
  • Wrap with jQuery(document).ready(function() { ... }) (read more)
  • Then insert your custom jQuery code, whether one or multiple commands.

What does this code do?

The code in the screenshot actually works (assuming your Canvas Area’s Section ID is ukh0pxs). It adds the ‘row-closed’ class to this Canvas Area so that the columns within this Canvas Area don’t have spacing between them.

Here’s the code to copy/paste into your DMS Editor Custom Scripts area (make sure to change the jQuery selectors for your use).

Comments are closed.