I would like help with a problem I'm having:
I'm doing something similar to a gallery, and when the user clicks on the image it has to open in full size, not the whole screen, but it covers a good part of the page. Also, I need it to center.
I've tried this code here:
$(document).ready(function(){
$('#img-responsive').on( "click", function() {
$('#cool').toggleClass('maxSize')
});
});
.maxSize {
height: 70%;
width: 70%; }
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js"></script><br><imgclass="img-responsive" src="img/teste.png">
But it did not work. I tried some variations of the above code, but still I did not succeed. Thank you in advance