vier mobile: prefixed transition in css, mobile-related javascript only on mobile

This commit is contained in:
fabrixxm 2015-11-12 09:30:54 +01:00
parent 54460bdf35
commit c81f63a5b3
2 changed files with 22 additions and 9 deletions

View file

@ -108,6 +108,9 @@ aside {
max-width: 400px;
width: 80%;
left: -100%;
-webkit-transition: left 0.5s;
-moz-transition: left 0.5s;
-o-transition: left 0.5s;
transition: left 0.5s;
}

View file

@ -87,19 +87,29 @@ function cmtBbClose(id) {
$("#comment-edit-bb-" + id).hide();
}
$(document).ready(function() {
$(".mobile-aside-toggle a").click(function(e){
e.preventDefault();
$("aside").toggleClass("show");
});
$(".tabs").click(function(e){
$(this).toggleClass("show");
});
});
</script>
EOT;
if ($a->is_mobile || $a->is_tablet){
$a->page['htmlhead'] .= <<< EOT
<script>
$(document).ready(function() {
$(".mobile-aside-toggle a").click(function(e){
e.preventDefault();
$("aside").toggleClass("show");
});
$(".tabs").click(function(e){
$(this).toggleClass("show");
});
});
</script>
EOT;
}
// Hide the left menu bar
if (($a->page['aside'] == "") AND in_array($a->argv[0], array("community", "events", "help", "manage", "notifications",
"probe", "webfinger", "login", "invite", "credits")))