Commit 7e8aedde authored by Jerome Chauveau's avatar Jerome Chauveau
Browse files

No more JQuery

parent 84e7b7be
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line

#demo_presentation{
  text-align: justify;
    font-size: 1.2rem;
}

.figure{
@@ -8,6 +9,10 @@
  clear:right;
  float:left;
}

.navbar-brand{
    margin-left: 2rem;
}
a {
   color: rgba(0,0,0,.5);
}
+23 −10
Original line number Diff line number Diff line

$(document).ready(function(){
  
  $(".row a").hover(
  function() {
    $( this ).siblings('.demo_text').show();
  }, function() {
    $( this ).siblings('.demo_text').hide();
  }
);
document.addEventListener('DOMContentLoaded',() =>{
    document.querySelectorAll('.row a').forEach((elt) => {
        elt.addEventListener('mouseover', () => {
            elt.parentElement.querySelectorAll('.demo_text').forEach((dt) => {
                dt.style.display = 'block';
            })
        });

        elt.addEventListener('mouseout', () => {
            elt.parentElement.querySelectorAll('.demo_text').forEach((dt) => {
                dt.style.display = 'none';
            })
        })
    })

  // $(".row a").hover(
  // function() {
  //   $( this ).siblings('.demo_text').show();
  // }, function() {
  //   $( this ).siblings('.demo_text').hide();
  // }
//);

});