Difference between revisions of "Template:Cologne-Duesseldorf/js-jquery"

(Blanked the page)
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
<html>
 
<body>
 
<!-- jQuery js -->
 
<script>
 
$(document).ready(function(){
 
$('#sidebar-btn').click(function(){
 
$('#sidebar').toggleClass('visible');
 
$('#overlay').toggleClass('active');
 
$('#container').toggleClass('inactive');
 
$('#sidebar-btn').toggleClass('inactive');
 
});
 
$('#overlay').click(function(){
 
$('#sidebar').toggleClass('visible');
 
$('#overlay').toggleClass('active');
 
$('#container').toggleClass('inactive');
 
$('#sidebar-btn').toggleClass('inactive');
 
});
 
 
$('#sidebar ul ul.sub').click(function(){
 
$(this).children().toggleClass('active');
 
});
 
});
 
</script>
 
 
<!-- hammer js --->
 
<script>
 
var myContainer = document.getElementById('container');
 
var mC = new Hammer(myContainer);
 
var myOverlay = document.getElementById('overlay');
 
var mO = new Hammer(myOverlay);
 
  
 
mC.on("panright", function(ev) {
 
$('#container').addClass('inactive');
 
$('#overlay').addClass('inactive');
 
});
 
 
mO.on("panleft", function(ev) {
 
$('#container').removeClass('inactive');
 
$('#overlay').removeClass('inactive');
 
 
});
 
</script>
 
</body>
 
</html>
 

Latest revision as of 15:32, 6 May 2017