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

(Blanked the page)
 
(9 intermediate revisions by the same user not shown)
Line 1: Line 1:
<html>
 
<body>
 
  
http://ajax.googleapis.com/ajax/libs/jquerymobile/1.4.5/jquery.mobile.min.js
 
 
<!----------------------------------------------
 
-------------MY CODE ------------------------>
 
<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');
 
});
 
$(function(){
 
  $( "#container" ).on( "swiperight", swipeHandler );
 
  $( "#overlay" ).on( "swipeleft", swipeHandler );
 
});
 
  function swipeHandler( event ){
 
$('#sidebar').toggleClass('visible');
 
$('#overlay').toggleClass('active');
 
$('#container').toggleClass('inactive');
 
$('#sidebar-btn').toggleClass('inactive');
 
  }
 
});
 
 
 
 
 
 
</script>
 
</body>
 
</html>
 

Latest revision as of 15:32, 6 May 2017