Debian Codegraph @

resources/pgcluu_slide.js

raw symbols SCIP
1
2 jQuery(function (){
3
4 jQuery('.slide').hide();
5 jQuery('.active-slide').show();
6
7 /* Go to specific slide and report from external link call */
8 var activeMenu = location.hash;
9 if (activeMenu) {
10 activeMenu = activeMenu.substring(1);
11 var lkobj = document.getElementById(activeMenu);
12 var liId = jQuery(lkobj).parent().attr("id");
13 if (liId != undefined) {
14 var slideId = '#'+liId;
15 jQuery('#main-container li.slide').removeClass('active-slide').hide();
16 jQuery(slideId).addClass("active-slide").fadeIn();
17 window.location.hash = '#'+activeMenu;
18 }
19 }
20
21 jQuery('.navbar li.dropdown').click(function() {
22 var id = jQuery(this).attr("id");
23 id = id.substring(5);
24 if ( (id == 'home') || (id == 'about') || (id == 'info')) {
25 var slideId = '#'+id+'-slide';
26 var currentSlide = jQuery('#main-container .active-slide').attr("id");
27 currentSlide = '#'+currentSlide;
28
29 if(slideId != currentSlide) {
30 jQuery('#main-container li.slide').removeClass('active-slide').hide();
31 jQuery(slideId).addClass("active-slide").fadeIn();
32 }
33 }
34 });
35
36 jQuery('.navbar li ul li').click(function() {
37 var liId = jQuery(this).attr("id");
38 var id = liId.substring(5);
39 if (id.lastIndexOf("-") > 0) {
40 var lookobj = document.getElementById(id+'-slide');
41 if (lookobj != undefined) {
42 var slideId = '#'+id+'-slide';
43 jQuery('#main-container li.slide').removeClass('active-slide').hide();
44 jQuery(slideId).addClass("active-slide").fadeIn();
45 }
46 }
47 });
48 });
49
50 jQuery(document).ready(function () {
51 jQuery('.sql').dblclick(function () {
52 if (this.style == undefined || this.style.whiteSpace == 'pre') {
53 this.style.whiteSpace ='normal';
54 } else {
55 this.style.whiteSpace = 'pre';
56 }
57 });
58 jQuery('.icon-copy').click(function () {
59 var obj = $(this).parent()[0];
60 if (window.getSelection) {
61 var sel = window.getSelection();
62 sel.removeAllRanges();
63 var range = document.createRange();
64 range.selectNodeContents(obj);
65 sel.addRange(range);
66 } else if (document.selection) {
67 var textRange = document.body.createTextRange();
68 textRange.moveToElementText(obj);
69 textRange.select();
70 }
71 });
72 });
73