From a3ab2b223b8d7494bf860396975868644b3e89cb Mon Sep 17 00:00:00 2001 From: jzaefferer Date: Wed, 14 Jul 2010 19:39:29 +0200 Subject: [PATCH] Add support for multiple events, along with hoverintent demo. Fixes #3614 - Accordion: support multiple events being set at the same time --- demos/accordion/hoverintent.html | 133 +++++++++++++++++++++++++++++++ demos/accordion/index.html | 1 + ui/jquery.ui.accordion.js | 2 +- 3 files changed, 135 insertions(+), 1 deletion(-) create mode 100644 demos/accordion/hoverintent.html diff --git a/demos/accordion/hoverintent.html b/demos/accordion/hoverintent.html new file mode 100644 index 000000000..e0f2d742f --- /dev/null +++ b/demos/accordion/hoverintent.html @@ -0,0 +1,133 @@ + + + + + jQuery UI Accordion - Default functionality + + + + + + + + + + +
+ +
+

Section 1

+
+

+ Mauris mauris ante, blandit et, ultrices a, suscipit eget, quam. Integer + ut neque. Vivamus nisi metus, molestie vel, gravida in, condimentum sit + amet, nunc. Nam a nibh. Donec suscipit eros. Nam mi. Proin viverra leo ut + odio. Curabitur malesuada. Vestibulum a velit eu ante scelerisque vulputate. +

+
+

Section 2

+
+

+ Sed non urna. Donec et ante. Phasellus eu ligula. Vestibulum sit amet + purus. Vivamus hendrerit, dolor at aliquet laoreet, mauris turpis porttitor + velit, faucibus interdum tellus libero ac justo. Vivamus non quam. In + suscipit faucibus urna. +

+
+

Section 3

+
+

+ Nam enim risus, molestie et, porta ac, aliquam ac, risus. Quisque lobortis. + Phasellus pellentesque purus in massa. Aenean in pede. Phasellus ac libero + ac tellus pellentesque semper. Sed ac felis. Sed commodo, magna quis + lacinia ornare, quam ante aliquam nisi, eu iaculis leo purus venenatis dui. +

+
    +
  • List item one
  • +
  • List item two
  • +
  • List item three
  • +
+
+

Section 4

+
+

+ Cras dictum. Pellentesque habitant morbi tristique senectus et netus + et malesuada fames ac turpis egestas. Vestibulum ante ipsum primis in + faucibus orci luctus et ultrices posuere cubilia Curae; Aenean lacinia + mauris vel est. +

+

+ Suspendisse eu nisl. Nullam ut libero. Integer dignissim consequat lectus. + Class aptent taciti sociosqu ad litora torquent per conubia nostra, per + inceptos himenaeos. +

+
+
+ +
+ +
+

+Click headers to expand/collapse content that is broken into logical sections, much like tabs. +Optionally, toggle sections open/closed on mouseover. +

+

+The underlying HTML markup is a series of headers (H3 tags) and content divs so the content is +usable without JavaScript. +

+
+ + + diff --git a/demos/accordion/index.html b/demos/accordion/index.html index de3751128..70f0d9dee 100644 --- a/demos/accordion/index.html +++ b/demos/accordion/index.html @@ -14,6 +14,7 @@
  • No auto height
  • Collapse content
  • Open on mouseover
  • +
  • Open on hoverintent
  • Customize icons
  • Sortable
  • diff --git a/ui/jquery.ui.accordion.js b/ui/jquery.ui.accordion.js index 6bda009e3..bcb0452bb 100644 --- a/ui/jquery.ui.accordion.js +++ b/ui/jquery.ui.accordion.js @@ -117,7 +117,7 @@ $.widget("ui.accordion", { this.headers.find('a').attr('tabIndex','-1'); if (o.event) { - this.headers.bind((o.event) + ".accordion", function(event) { + this.headers.bind(o.event.split(" ").join(".accordion ") + ".accordion", function(event) { self._clickHandler.call(self, event, this); event.preventDefault(); }); -- 2.39.5