js popin, pb lien js et variable twig

This commit is contained in:
2021-04-01 13:04:21 +02:00
parent 615303285a
commit 99edbc1d89
6 changed files with 93 additions and 31 deletions
+41 -9
View File
@@ -37,16 +37,48 @@ jQuery(document).ready(function($){
// Responsive Menu
// * Grab data attributes from twig with JQuery
// */
// $(() => {
//
// // Select elements by their data attribute
// const $personneElements = $('[data-personne-id]');
//
// // Map over each element and extract the data value
// const $personneIds =
// $.map($personneElements, item => $(item).data('personneId'));
//
// // You'll now have array containing string values
// console.log($personneIds); // eg: ["1", "2", "3"]
// });
$(".bouton").click(function(){
$("#modal .message").html();
$("#modal").addClass("open");
// $("#body").addClass("grey");
});
// {% set script %}
// // ton js
// var mavariable = {{ twigvar }};
// {% endset %}
// {% do assets.addInlineJs(script) %}
//
// // POPIN Biographies
// var id = $('#biographie').data('id');
// if id > 0{
// $(".bouton").click(function(){
// $("#modal .message").html(#biographie);
// $("#modal").addClass("open");
// // $("#body").addClass("grey");
// });
// }
// $(".bouton").click(function(){
// $("#modal .message").html();
// $("#modal").addClass("open");
// // $("#body").addClass("grey");
// });
//
// $("#modal .mask, #modal a.close").click(function(){
// $("#modal").removeClass("open");
// return false;
// });
$("#modal .mask, #modal a.close").click(function(){
$("#modal").removeClass("open");
return false;
});
});