I've installed a 3rd-party jQuery plugin (it's an accordion). It displays on my page, and works as expected.
I want to trigger one of the plugin's actions (open a particular slide) when I click on an image on my page.
I can't seem to get the code &/or syntax for doing that right.
The plugin I've installed is "EasyAccordion" (http://www.madeincima.eu/blog/jquery-plugin-easy-accordion/). It's .js source is posted here: http://pastebin.com/55JB4pr2.
I'm using the plugin on a Drupal7 page.
I don't think that the specific plugin, or the fact that it's been used in Drupal, is relevant to the proper jQuery usage.
jQuery's bundled with Drupal. I init the plugin on my page with:
( function ($) {
Drupal.behaviors.myEasyAccordion = {
attach: function(context,settings) {
$('#accordion1',context).easyAccordion({
autoStart: false,
...
});
}
};
})(jQuery);
In my markup, I have
...
<div id="accordion1">
... EASYACCORDION MARKUP ...
</div>
...
Again, with this init & markup, the accordion appears/works as expected.
On the same page, in another
I've added an image-link, i.e.,
...