This page was last edited on September 30, 2015, at 18:32.
Comments or questions about this documentation? Contact us for support!
This is a collection of UI customization examples. Although these examples do not cover every possible customization case, they should give you a sample of what can be achieved and how to begin.
Customization type: CSS Based
Prerequisites
You must have basic knowledge of CSS and HTML.
Start of Procedure
You can see that there is an additional :hover rule for the button:
/* 1. copy-paste the selector of the element to override */
.gcb-startChat, .gcb-startChat:hover {
/* 2. override some rules: */
background: url(http://placekitten.com/23/84);
}
End of Procedure
Customization Type: JavaScript Based
In this example, we will customize the starting position of the Co-browse toolbar:
Prerequisites
Start of Procedure
var _genesys = {
cobrowse: {
onReady: function(cobrowseAPI) {
// ...
}
}
}
cobrowseAPI.onSessionStarted.add(function() {
// ...
});
You can also see from the Styles tab that position is not set for this element.
jQuery('.gcb-toolbar').css({
top: 100,
left: 300
});
// 1. Get the API
var _genesys = {
cobrowse: {
onReady: function(cobrowseAPI) {
// 2. Use the API to subscribe on “session started” event
cobrowseAPI.onSessionStarted.add(function() {
// 3. Use jQuery to get the toolbar and reposition it
jQuery('.gcb-toolbar').css({
top: 100,
left: 300
});
});
}
}
};
End of Procedure
.gcb-toolbar {
top: 100px !important;
left: 300px !important;
}
This solution is less ideal because you would have to use the !important modifier to override the inline styles of the element and this modifier would make the toolbar non-draggable.