Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible to change the 'send feedback' button? #22

Open
d2gibbons opened this issue May 22, 2013 · 1 comment
Open

Possible to change the 'send feedback' button? #22

d2gibbons opened this issue May 22, 2013 · 1 comment

Comments

@d2gibbons
Copy link

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?

@partyz
Copy link

partyz commented Jul 15, 2013

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants