Introduction
Cooma is a social trading platform connected to brokers worldwide, who offer trading in the financial markets.
Plug-in Installation
To implement the Social plug-in, add the following scripts just before the closing </body> tag:
<script src="https://social.pandats.com/production/social-loader.js"></script>
<script
src="https://social.pandats.com/production/social-bundle.js"
defer
></script>Dom Integration
To integrate the Social plug-in, add the following HTML tags to your page
Social switch tag
This switch button will toggle the Trade-room/Social platform
<panda-forex-social-switch
show-switch="true"
auto-login="false"
></panda-forex-social-switch>Social platfrom tag
In this example, we split the trading platform and the social into two divs to show/hide each of them
<div id="tradingPlatform">
<!-- trading platform -->
<panda-forex-trading-platform></panda-forex-trading-platform>
</div>
<div id="socialPlatform">
<!-- social platform -->
<panda-social></panda-social>
</div>Callbacks
Add the following functions to your scripts
function platformHide() {
console.log('Trading platform is hidden');
$('#tradingPlatform').fadeOut(250);
}
function platformShow() {
console.log('Trading platform is shown');
$('#socialPlatform').fadeIn(500);
}Find the forexEvents object in your script files, and add the following properties:
platformHide: platformHide,
platformShow: platformShow