mirror of
https://github.com/thelounge/thelounge
synced 2025-02-16 21:28:23 +00:00
Swipe/click chat to toggle sidebar. Close #9
This commit is contained in:
parent
95596f4039
commit
fca95d9b79
1 changed files with 9 additions and 1 deletions
|
@ -255,9 +255,17 @@ $(function() {
|
||||||
if (touchDevice) {
|
if (touchDevice) {
|
||||||
toggle = "touchstart";
|
toggle = "touchstart";
|
||||||
}
|
}
|
||||||
chat.on(toggle, ".lt, .rt", function() {
|
|
||||||
|
chat.on(toggle, ".lt, .rt", function(e) {
|
||||||
var btn = $(this);
|
var btn = $(this);
|
||||||
viewport.toggleClass(btn.attr("class"));
|
viewport.toggleClass(btn.attr("class"));
|
||||||
|
if (viewport.hasClass("lt")) {
|
||||||
|
e.stopPropagation();
|
||||||
|
viewport.find("#main").one(toggle, function(e) {
|
||||||
|
viewport.removeClass("lt");
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
function toArray(val) {
|
function toArray(val) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue