scinote-web/app/assets/javascripts/users/shared/linkedin_sign_in_links.js
Soufiane c28f86d46d
Refactor inline events [SCI-8434] (#5403)
Refactor inline events in task results [SCI-8434]
2023-05-16 09:34:36 +02:00

17 lines
542 B
JavaScript

(function() {
const linkedinSignInButton = $('.linkedin-signin-button');
const hoverSrc = linkedinSignInButton.data('hover-src');
const defaultSrc = linkedinSignInButton.data('default-src');
const clickSrc = linkedinSignInButton.data('click-src');
linkedinSignInButton
.on('mouseover', () => {
linkedinSignInButton.attr('src', hoverSrc);
})
.on('mouseout', () => {
linkedinSignInButton.attr('src', defaultSrc);
})
.on('click', () => {
linkedinSignInButton.attr('src', clickSrc);
});
}());