popin biographie
This commit is contained in:
@@ -36,49 +36,27 @@ jQuery(document).ready(function($){
|
||||
});
|
||||
// Responsive Menu
|
||||
|
||||
// POPIN Biographies
|
||||
|
||||
// * 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(event){
|
||||
console.log(event);
|
||||
//
|
||||
var mods = document.querySelectorAll('.modal');
|
||||
mods.forEach((m, i) => {
|
||||
m.classList.remove('open')
|
||||
});
|
||||
//
|
||||
var btn = event.currentTarget;
|
||||
console.log('btn', btn);
|
||||
var mod = btn.parentNode.querySelector('.modal');
|
||||
mod.classList.add('open')
|
||||
|
||||
// {% 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(event){
|
||||
$ (".modal").removeClass("open");
|
||||
return false;
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
// $( function() {
|
||||
// $( "#popin" ).dialog({
|
||||
// autoOpen: false,
|
||||
// show: {
|
||||
// effect: "blind",
|
||||
// duration: 1000
|
||||
// },
|
||||
// hide: {
|
||||
// effect: "explode",
|
||||
// duration: 1000
|
||||
// }
|
||||
// });
|
||||
//
|
||||
// $( "#opener" ).on( "click", function() {
|
||||
// $( "#popin" ).dialog( "open" );
|
||||
// });
|
||||
// } );
|
||||
|
||||
|
||||
// $(".bouton").click(function(){
|
||||
// $("#modal .message").html();
|
||||
// $("#modal").addClass("open");
|
||||
// });
|
||||
//
|
||||
// $("#modal .mask, #modal a.close").click(function(){
|
||||
// $("#modal").removeClass("open");
|
||||
// return false;
|
||||
// });
|
||||
Reference in New Issue
Block a user