Files
interblue.pl/themes/InterBlue/assets/js/custom.js
2024-10-25 14:16:28 +02:00

52 lines
1.2 KiB
JavaScript
Raw Blame History

/*
* Custom code goes here.
* A template should always ship with an empty custom.js
*/
/** Przycisk scrollowania do g<>ry *************************************/
if ($("#back-to-top").length) {
var scrollTrigger = 100, // px
backToTop = function () {
var scrollTop = $(window).scrollTop()
if (scrollTop > scrollTrigger) {
$("#back-to-top").addClass("show")
} else {
$("#back-to-top").removeClass("show")
}
}
backToTop()
$(window).on("scroll", function () {
backToTop()
})
$("#back-to-top").on("click", function (e) {
e.preventDefault()
$("html,body").animate(
{
scrollTop: 0,
},
700
)
})
}
/** Usuwanie element<6E>w sklepu z bloga ****/
$("#module-amazzingblog-blog .PM_ASBlockOutput").remove()
$("#module-amazzingblog-blog .block-categories").remove()
/** Responsywne banner ****/
$("img").addClass("img-fluid")
/** Responsywne blog cover ****/
$(".blog.blocks.displayHome .post-item .post-item-cover img").addClass(
"img-fluid"
)
$(function () {
$("#btn_place_order_2").on("click", function () {
$("#btn_place_order").trigger("click")
})
$("#btn_continue_shopping_2").on("click", function () {
$("#btn_continue_shopping").trigger("click")
})
})