I am using this script a>, in that code snippet
<head>
<link href="http://maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script><scriptsrc="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<link href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet" />
<link href="https://cdnjs.cloudflare.com/ajax/libs/jasny-bootstrap/3.1.3/css/jasny-bootstrap.css" rel="stylesheet" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/jasny-bootstrap/3.1.3/js/jasny-bootstrap.js"></script></head><body><divclass="container col-md-6 fileinput fileinput-new" data-provides="fileinput" id="btnImagem">
<div class="col-md-6" style="padding-top: 45px;">
<span class="btn btn-info btn-file"><span>Imagem</span>
<input type="file" />
</span>
</div>
<div class="col-md-6" id="imagem" style="padding-top: 35px;">
<span class="fileinput-preview" style="max-height: 68px;"></span>
</div>
</div>
</body>
The problem is that in Chrome the image that is inserted is with max-height = 68px, and when I go in Firefox the image does not get max-lenght. (Do not resize and resize as in Chrome)
How to solve this problem?
I'm having the impression that this js snippet does not run in Firefox
if (preview.css('max-height') != 'none') $img.css('max-height', parseInt(preview.css('max-height'), 10) - parseInt(preview.css('padding-top'), 10) - parseInt(preview.css('padding-bottom'), 10) - parseInt(preview.css('border-top'), 10) - parseInt(preview.css('border-bottom'), 10))
Any solution?