0
Good afternoon!
I wonder if it is possible to create a Function with Jquery exclusive for a specific browser
For example:
$(document).ready(function(e) {
$("#imagens a").click(function(e) {
var id = $(this).prop("id");
id = "Imagens/foto"+id+".jpg";
$(window).bind('scroll', setTopo);
$("#img_principal").css('display','block');
$("#img_principal").attr("src",id);
});
$(".titulo").click(function(e) {
$("#img_principal").css('display','none');
$(window).unbind('scroll', setTopo);
});
});
Where my faith is:
function setTopo(){
$(window).scrollTop(2000);
}
I wanted to open in Firefox/Opera the values(scrollTop) were other but with the same function, since the structure I built has a difference when running in these browsers. I used Chrome as a base and from there I started to adapt in other browsers.
Grateful
Yes this is possible, it would be interesting to explain the problem and what is the behavior/ technology that gives different results in different browsers and so we help normalize the values.
– Sergio
When opening an image I wanted the mouse scroll to be locked, so I used scroll, function with value(px). The problem is that when opening in another browser the value has variation, in that the image in question appears cropped or out of position (since the browser hangs at the value I reported).
– A.L Freire