1
0
mirror of https://github.com/webslides/WebSlides.git synced 2025-08-20 20:02:07 +02:00

Moving specific javascript from library to demo

This commit is contained in:
Luis
2017-02-11 16:51:46 +01:00
parent cab0758f9e
commit d56448431d
2 changed files with 20 additions and 21 deletions

View File

@@ -3134,7 +3134,26 @@
<script defer src="../static/js/svg-icons.js"></script>
<script type="text/javascript">
var slide = jQuery('#webslides').webslides();
jQuery(document).ready(function($){
// Tabs
jQuery('ul.tabs li').click(function(){
var $this = jQuery(this);
var tab_id = $this.attr('data-tab');
jQuery('ul.tabs li').removeClass('current');
jQuery('.tab-content').removeClass('current');
$this.addClass('current');
jQuery("#"+tab_id).addClass('current');
});
});
// Prototype better, faster. To show the grid/baseline.png, press Enter on keyboard
jQuery(document).keypress(function(e) {
if(e.which == 13) {
jQuery('body').toggleClass('baseline').css('height', $(document).height());
}
});
</script>
</body>
</html>

View File

@@ -493,23 +493,3 @@ jQuery.fn.webslides = function(options) {
// Return same object
return obj;
}
jQuery(document).ready(function($){
// Tabs
jQuery('ul.tabs li').click(function(){
var $this = jQuery(this);
var tab_id = $this.attr('data-tab');
jQuery('ul.tabs li').removeClass('current');
jQuery('.tab-content').removeClass('current');
$this.addClass('current');
jQuery("#"+tab_id).addClass('current');
});
});
// Prototype better, faster. To show the grid/baseline.png, press Enter on keyboard
jQuery(document).keypress(function(e) {
if(e.which == 13) {
jQuery('body').toggleClass('baseline').css('height', $(document).height());
}
});