Skip to content

Instantly share code, notes, and snippets.

@kadsyy
Last active October 13, 2023 03:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kadsyy/640d7b64e1c57d4411cb5981da391500 to your computer and use it in GitHub Desktop.
Save kadsyy/640d7b64e1c57d4411cb5981da391500 to your computer and use it in GitHub Desktop.
java
$(".modal-dialog").parent().on("show.bs.modal", function (e) {
$(e.relatedTarget.attributes["data-target"].value).appendTo("body");
});
//init if class exist
if (document.getElementsByClassName("slider-carousel").length) {
var splide = new Splide('.slider-carousel', {
perPage: 4,
focus: 0,
pagination: false,
gap: '1rem',
omitEnd: true,
breakpoints: {
640: {
perPage: 2,
},
}
});
splide.mount();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment