-1
Hi, I have a problem.. In an image of my site, which has ID #image, when clicked it executes a code in jquery, as the below:
<script>
$(document).ready(function() {
$("#imagem").click(function(){
$("#div1, #div2").css("display", "none");
});
});
</script>
Problem is, when clicked image does not perform the action defined there, but if I go to the page, and change the attribute border-sizing
for content-box
or take it (da anyway, because without the default is to be content-box) so my image performs action when clicked.
Which could only work when I take off the attribute box-sizing: border-box
, or change to content-box
for example?
CSS of the image:
<span id="imagem"><img src="img.png" border="0" class="img-responsive"/></span>
Basically it’s the bootstrap img-Responsive class! span has the id #image, because jquery checks if there was any click on that span, as in span it has only that image, so the image will run jQuery.
Okay. Based on this answer, I thought it best to mark the question as a problem that cannot be reproduced (see the explanation of the reason for the closure above).
– bfavaretto