feedback.js
feedback.js copied to clipboard
Possible to change the 'send feedback' button?
I would like to use feedback.js but the floating 'Send feedback' button would need to be replaced with a fixed A HREF link on the page.
The issue I have is the onClick event contains a lot of JS and I don't know how to activate it via a href without the floating button removed.
This possible?
In your Index (or footer if templated):
$(document).ready(function () {
// initialize Feedback
Feedback({ h2cPath: navigation.getUrl('Scripts/Feedback/html2canvas.js') });
// change button to anchor
$('button.feedback-btn').replaceWith('a.feedback-btn');
// wrap in div so You could apply positioning style
$(".feedback-btn").wrap('<div id="feedback-fixed"></div>');
});
Now in the CSS:
#feedback-fixed { z-index: 10005; width: YOUR_WIDTH !important; height: YOUR_HEIGHT !important; position: fixed; /* generally you can use whatever You want / / optional other styles below e.g. */ top: 50px; right:-6px; }