wiQuery w00t!

9 views
Skip to first unread message

Brian Topping

unread,
Nov 29, 2010, 3:30:54 PM11/29/10
to wiquery-plugins
Wow, very neat stuff! Thanks for all your work, guys! :-)

Kind of a noob question, how would I add hoverIntent to an Accordion?
I started by bringing
http://wiquery-plugins.googlecode.com/svn-history/r146/trunk/wiquery-plugins/other-plugins/src/main/java/com/wiquery/plugin/superfish/js/HoverIntentJavaScriptResourceReference.java
and it's associated .js into my project, then created the following:


private static class HoverIntentAccordion extends Accordion {
public HoverIntentAccordion() {
super("accordion");
getOptions().putLiteral("event", "hoverIntent");
}

@Override
public void contribute(WiQueryResourceManager
wiQueryResourceManager) {
super.contribute(wiQueryResourceManager);

wiQueryResourceManager.addJavaScriptResource(HoverIntentJavaScriptResourceReference.get());
}
}

This isn't correct though. Am I missing something simple or do I have
to hack the js for Accordion? I looked at it in comparison to the
Superfish js (which has conditional logic for hoverIntent), but
nothing stood out that I should modify.

Kind regards, Brian

Ernesto Reinaldo Barreiro

unread,
Nov 29, 2010, 4:03:33 PM11/29/10
to wiquery...@googlegroups.com
Brian,

Actually I haven't had time to look much into the internal workings
of Superfish and how does it uses hoverIntent: I just built a
wrapper for the existing plugin:-(

Thank for the encouraging words:-)

Kind regards,

Ernesto

Brian Topping

unread,
Nov 29, 2010, 4:46:24 PM11/29/10
to wiquery...@googlegroups.com
Thanks Ernesto. That cleared up some noise in my head!

I got things working actually and wouldn't mind contributing the code. Please let me know what the best means is! :-)

Cheers, Brian

Ernesto Reinaldo Barreiro

unread,
Nov 29, 2010, 4:57:38 PM11/29/10
to wiquery...@googlegroups.com
Brian,

Just create an issue + patch and I will have a look to it.

Cheers,

Ernesto

Brian Topping

unread,
Nov 30, 2010, 2:41:50 AM11/30/10
to wiquery...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages