0

I am trying to write my own Dojo/Dijit Editor Plugin. the only Information i found on the topic is this forum post recommending to use the print plugin as a pattern. So i did build my own plugin, copying the print plugin and not changing anything apart from the name. Then i included the plugin to an editor instance.

But instead of getting the print buttons functionality and the print button, i get a button with classes "dijitButtonDisabled dijitDisabled" and no functionality. The Print button does work though.

Anyone any idea why that is?

1 Answer 1

1

In JavaScript events are often hooked onto individual objects, which are referenced by things like id, classes, and other parameters. For this to work you need both the selector and the original element to match.

It sounds like you updated some parts of the code (by changing the names) but did not update the corresponding actions. I'd start by looking for any remaining events bound to the previous names (in jQuery, look for bind() or live()) and changing those selectors to the new names if you find them.

Not the answer you're looking for? Browse other questions tagged or ask your own question.