mirror of
https://github.com/thelounge/thelounge
synced 2024-11-22 12:03:11 +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) {
|
||||
toggle = "touchstart";
|
||||
}
|
||||
chat.on(toggle, ".lt, .rt", function() {
|
||||
|
||||
chat.on(toggle, ".lt, .rt", function(e) {
|
||||
var btn = $(this);
|
||||
viewport.toggleClass(btn.attr("class"));
|
||||
if (viewport.hasClass("lt")) {
|
||||
e.stopPropagation();
|
||||
viewport.find("#main").one(toggle, function(e) {
|
||||
viewport.removeClass("lt");
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
function toArray(val) {
|
||||
|
|
Loading…
Reference in a new issue