For every action you perform inside VWO Editor, it generates a JavaScript code snippet. You can modify the generated code snippet to implement changes to the element.
The following table lists the actions and corresponding code snippets:
Operation | JavaScript Code Generated |
Move | vwo_$(‘elementPath’).vwoCss({“height”:”78px !important”,”width”:”173px !important”,”top”:”147px !important”,”left”:”21px !important”,”zIndex”:”auto !important”,”position”:”relative !important”,”display”:”inline-block !important”}); |
Show/Hide (Visibility) | vwo_$(‘elementPath’).vwoCss({“visibility”:”hidden !important”}); |
Remove | vwo_$(‘elementPath’).vwoCss({“display”:”none !important”}); |
Change Image | vwo_$(“elementPath”).vwoCss({“img”:”/url/path !important”}); |
Change URLs | vwo_$(‘anchorPath’).attr({ “src’: ‘/new/path” }); |
Change CSS (Styling) | vwo_$(‘elementPath’).vwoCss({‘property1’: value1, ‘property2’: value2.. !important}); |
Content (Edit) | vwo_$(‘elementPath’).html(“Content to put”); |
Content (Edit HTML) | vwo_$(‘elementPath’).replaceWith(“<div>Dummy HTML</div>”); |
Change Background Image | vwo_$(‘elementPath’).vwoCss({“background-image”: “url(/images/vwo_logo.png) !important”}); |
Paste (Before An Element) | vwo_$(‘elementPath’).before(“<div>Dummy Existing Element to Paste</div>”); |
Paste (After An Element) | vwo_$(‘elementPath’).after(“<div>Dummy Existing Element to Paste</div>”); |
Rearrange |
|
Custom Code to Remove An Element from Your DOM |
vwo_$(‘elementPath’).remove(); or var dev = ‘xyz@example.com’; alert(dev); |