I would like to have my blog run some JavaScript code when certain particular words are clicked on.

One approach would be to include "onClick" handlers in HTML elements within the posts and disable any filtering that would remove them, but that seems rather dangerous.

Another approach would be create a link whose address starts with a "#" and have a script watch for a changing address suffix, but that seems rather hokey.

A third approach would be to have a script scan through the DOM tree for a certain tag and bind events to any elements that contain it.
That might work, though it would leave open the question of how to ensure that switching the editor between HTML and WYSIWYG mode won't gobble up any of the essential information from the annotations.

I suspect the right approach is to use shortcodes, but I'm just starting with WordPress and while I know Javascript, I don't know PHP.

I doubt I'm the first person who has tried to bind actions to particular words in a post, so I don't want to re-invent the wheel needlessly.

If I will want to have many words run the same method, but assign a different string parameter value to each (e.g. I might want to attach the parameter "bird" to "robin", and "fish" to "guppy", so that clicking "robin" would run ClickedWord("bird") and clicking "guppy" would run ClickedWord("fish")) what would be the best approach to facilitate that?


Question: Respberry Pi fails to boot with custom kernel
Answer: This:


  &gt; apt-get install gcc-arm-linux-gnueabi


Will be a toolchain targeting the more common ARMv7 architecture.  It probably does not properly support the ARMv6 Broadcom SoC used on the pi, but you could try by adding:

CCFLAGS += -mcpu=armv6j -mfpu=vfp -mfloat-abi=hard