I have a script for a sliding panel woring as a menu. It works welllm but i have to apply a different margin-top depending on what screen resolution (mobile).
$(document).ready(function() {
$(".topMenuAction").click( function() {
if ($("#openCloseIdentifier").is(":hidden")) {
$("#slider").animate({
marginTop: "-130px"
}, 500 );
$("#topMenuImage").html('<img src="img/icono-nav.png"/>');
$("#openCloseIdentifier").show();
} else {
$("#slider").animate({
marginTop: "0px"
}, 500 );
$("#topMenuImage").html('<img src="img/icono-cerrar.png"/>');
$("#openCloseIdentifier").hide();
}
});
Thank you :)