emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* info-js hijacks clicks disallowing integration with other custom click handlers
@ 2018-03-03  3:18 Cook, Malcolm
  0 siblings, 0 replies; only message in thread
From: Cook, Malcolm @ 2018-03-03  3:18 UTC (permalink / raw)
  To: org-mode-email

[-- Attachment #1: Type: text/plain, Size: 1516 bytes --]

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>

[-- Attachment #2: Type: text/html, Size: 4979 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-03-03  3:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-03  3:18 info-js hijacks clicks disallowing integration with other custom click handlers Cook, Malcolm

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).