emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] info-js hijacks clicks disallowing integration with other custom cli


From: Cook, Malcolm
Subject: [O] info-js hijacks clicks disallowing integration with other custom click handlers
Date: Sat, 3 Mar 2018 03:18:51 +0000

Hello,

 

I  am using infojs_opt while exporting to html from org-mode

 

I find that it “hijacks” all clicks.

 

This is interfering with some custom click handlers I’ve coded up for toggling the display of code listings when clicking on their caption. 

 

Does anyone have a suggestion for me to get the best of both worlds?

 

If it helps, below is what I have in my SETUPFILE.org to provide for my desired handling of source code.

 

Thanks

address@hidden

 

 

#+HTML_HEAD: <style>.org-src-name {text-decoration: underline; font-style: italic; font-family: monospace;  border-left: 1em solid Yellow; }</style>

#+HTML_HEAD:  <script type='text/_javascript_' class="init">

#+HTML_HEAD:   $(document).ready(function() {

#+HTML_HEAD:     $('.src').hide() // start out with hidden listings (source code) - my clients mostly want RESULTS!!!

#+HTML_HEAD:     $('.org-src-name').click(function(e){

#+HTML_HEAD            // allow to individually toggles src listing by clicking on its #+CAPTION (ASSUMING it has one).

#+HTML_HEAD:           $(this).next('.src').slideToggle();

#+HTML_HEAD:      });

#+HTML_HEAD: $(document).keyup(function(e){

#+HTML_HEAD:     switch(e.keyCode){

#+HTML_HEAD:     // display/hide ALL source code listings on w/alt-w (chosen to not conflict with +INFOJS_OPT keybindings).

#+HTML_HEAD:         case 87 : if (e.altKey) {$('.src').slideUp()} else {$('.src').slideDown()} ; break;

#+HTML_HEAD:     }

#+HTML_HEAD: });

#+HTML_HEAD:   } );

#+HTML_HEAD:   </script>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]