Maximizing the Efficiency of Your Custom Scripts Using the Custom Class Element

Follow

The Custom Class Element is a great way for maximizing the efficiency of your custom scripts. By specifying the same custom class element for different objects on your landing page, you can use CSS and Javascript to change the styling or apply functions to the same group of multiple elements at once. 

 

Setting a Custom Class Element for a Specific Object

To enter the custom class element for a specific object:

  1. Click on the item that you’d like to add the custom element
  2. Click on the Properties tab on the right side of the screen. 
  3. Scroll down to the Element Metadata section to find the Class field. 

single_object_custom_class_data_entry.gif

Setting a Custom Class Element for an Entire Landing Page

To enter a custom class element for an entire landing page:

  1. Click on the Page Properties tab on the right side of the screen. 
  2. Scroll down to the Element Metadata Tab
  3. Enter your class name in the Class field. 

custom_class_page_properties_entry.gif

Using Custom Class Elements in Custom CSS/Javascripts

 

Now that you’ve applied custom class elements to your landing pages, you can use the class attribute in your custom scripts to apply the same values to all items titled with that custom class element. 

Check out our article on using custom CSS and Javascripts on your landing page to start applying those scripts! 

Alternatively, you can also use those custom class elements on scripts across multiple landing pages by adding your custom scripts using script manager

 

Was this article helpful?
1 out of 1 found this helpful