-
AuthorPosts
-
October 19, 2016 at 9:05 pm #701515
My chat plugin needs me to add this code to the footer.php (i did that)
<script> // Chatra widget code </script> <script> jQuery(function () { // Bind event on button click jQuery('#custom-chatra-button').on('click', function() { // Open chat and focus input field Chatra('openChat', true); }); }); </script>
Then add this code to the button that would trigger the chat window to open, i’m not sure how to add this to my enfold button
<!-- Custom button anywhere on the page --> <button id="custom-chatra-button">Open chat window</button>
See private for where the button is
October 19, 2016 at 9:11 pm #701518Hey kilimats!
Please add following code to Functions.php file in Appearance > Editor
function av_custom_tps(){ ?> <script> // Chatra widget code </script> <script> jQuery(function () { // Bind event on button click jQuery('#custom-chatra-button').on('click', function() { // Open chat and focus input field Chatra('openChat', true); }); }); </script> <?php } add_action('wp_footer', 'av_custom_tps');
Then add following code to text widget, text tab of Text Block element or into Code Block element
<!-- Custom button anywhere on the page --> <button id="custom-chatra-button">Open chat window</button>
Cheers!
YigitOctober 19, 2016 at 9:19 pm #701521thanks the trigger works ! now how can i style it the same as the default enfold button?
October 19, 2016 at 9:23 pm #701523also is it possible to only show the button during a specific daily timeframe?
October 20, 2016 at 1:38 pm #701851Hi,
1- Button is not visible on my end. Have you removed it?
Please create a testing page with your button and example button so we can provide you accurate custom CSS code.2- Unfortunately it would require quite some time and customization of the theme to achieve this, so I am sorry to tell you that this is not covered by our support. However if its really important for you to get this done, you can always hire a freelancer to do the job for you :)
Best regards,
Yigit -
AuthorPosts
- You must be logged in to reply to this topic.