add logic & css to replace "Email Me" with "Submit a Question" widget
This commit is contained in:
@@ -1,4 +1,13 @@
|
||||
<!-- Google Tag Manager -->
|
||||
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
|
||||
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
|
||||
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
|
||||
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
|
||||
})(window,document,'script','dataLayer','GTM-NXHWQX3');</script>
|
||||
<!-- End Google Tag Manager -->
|
||||
|
||||
<style>
|
||||
|
||||
/* Fix the color of the "Search" button on the subject pages */
|
||||
form .btn.btn-info {
|
||||
background-color:#003466;
|
||||
@@ -10,12 +19,11 @@
|
||||
background-color:#003466;
|
||||
} */
|
||||
|
||||
|
||||
/* CSS to target buttons on the LibGuides homepage more specifically.
|
||||
These had been broken by a LibGuides update, 9/6/2016 */
|
||||
|
||||
.s-lg-hp-btn-section,
|
||||
.s-lg-hp-btn-section:hover,
|
||||
.s-lg-hp-btn-section:focus {
|
||||
.s-lg-hp-btn-section, .s-lg-hp-btn-section:hover, .s-lg-hp-btn-section:focus {
|
||||
background-color:#003466;
|
||||
border:1px solid #003466;
|
||||
}
|
||||
@@ -132,3 +140,28 @@
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
<!-- scripts to replace Email Me buttons in profiles with LibAnswers widgets -->
|
||||
<script src="https://kbcc-cuny.libanswers.com/1.0/widgets/19393"></script>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
try {
|
||||
document.getElementsByClassName("s-lib-profile-email")[0].innerHTML = "<div id='s-la-widget-19393'></div>"
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
};
|
||||
});
|
||||
</script>
|
||||
|
||||
<!-- global style to replace Email Me buttons in profiles with LibAnswers widgets -->
|
||||
<style>
|
||||
#s-la-widget-19393 {
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
#s-la-widget-19393 > button {
|
||||
background-color: #003466;
|
||||
border: #003466;
|
||||
color: #fff;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user