I try to do a function which when doing a 'hover' shadowing it happens with all the buttons of that class, besides this I can not give an id since the buttons are created depending on the news that go up by going to the base of data therefore could not give id's to each button to select them by jQuery then I show the code and the result.
I thank you for the help.
jQuery function
$('.btn-secondary').hover(function(){ $('.btn-secondary').css('boxShadow', '0 15px 15px 0 rgba(0,0,0,0.24),0 17px 20px 0 rgba(0,0,0,0.19)'); }, function(){ $('.btn-secondary').css('boxShadow', 'none'); }) container.php
<hr> <div class="container"> <div class="row"> <div class="col-md-1"></div> <?php $link=conectar(); $dc=mysqli_query($link,"Select * from tbl_noticias_blog Order By id DESC limit 3"); while($titulo=mysqli_fetch_array($dc)){ ?> <div class="col-md-3"> <h2> <?php echo $titulo['titulo']; ?> <input type="hidden" id="id" value="<?php echo $titulo['id'] ?>"> </h2> <p> <?php echo utf8_encode($titulo['dcorta']); ?>. </p> <button class="btn btn-secondary" onclick="irnoti(<?php echo $titulo['id'];?>);" role="button"><span>Ver detalles</span></button> </div> <?php } ?> </div> <br> <br> </div> How it shows the shadow: How it see
How I want the shadow: How i want
on,hoverprovides the element reference asthis.