feedback.js icon indicating copy to clipboard operation
feedback.js copied to clipboard

Possible to change the 'send feedback' button?

Open d2gibbons opened this issue 11 years ago • 1 comments

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?

d2gibbons avatar May 22 '13 14:05 d2gibbons

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; }

partyz avatar Jul 15 '13 07:07 partyz