Rich-text Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
Highlighted
Changing body class on a variation in Editor
BenH 04-24-14
Changing body class on a variation in Editor
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report
I want to change the body class for one of my page variations, but I can't seem to edit that with the Editor interface.
The highest level DOM node I can edit seems to be my wrapper div, if I try to right-click then Select Container, then body and html are greyed out.
How can I add this to a page variation...
<body class="my-class">
Thanks in advance.
BenH
Re: Changing body class on a variation in Editor
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report
Hey Ben
You can try adding the following line of code to your variation 'Edit code' section (which usually sits at the bottom of the editor):
$("body").addClass("my-class");
And then Apply and save the variation.
Hope this helps.
Regards
Tasin
Re: Changing body class on a variation in Editor
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report
Hi BenH!
Tasin already answered your question, I hope you managed to get it working.
In addition to this, I've added your request as an improvement suggestion so that our product team can consider it as they enhance the editor.
Thanks,
Toby
Tasin already answered your question, I hope you managed to get it working.
In addition to this, I've added your request as an improvement suggestion so that our product team can consider it as they enhance the editor.
Thanks,
Toby