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

~malcolm_cook@stowers.org

 

 

#+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>