Hello, I have a problem .. In an image of my website, which has ID #imagem, when clicked it executes a code in jquery, like the one below:
<script>
$(document).ready(function() {
$("#imagem").click(function(){
$("#div1, #div2").css("display", "none");
});
});
</script>
Problem is that the image, when clicked does not execute the action defined there, but if I go on the page, and change the attribute border-sizing
to content-box
or take it off (of the same, why without the default is to be content-box) then my image performs action when clicked.
What can it be that only works when I take the box-sizing: border-box
attribute, or change to content-box
for example?
Image CSS:
<span id="imagem"><img src="img.png" border="0" class="img-responsive"/></span>
Basically it's the img-responsive bootstrap class! the span has the id #imagem, because jquery checks if there was any click on that span, as in span it only has that image, so the image will execute jQuery.