Permalink
Browse files

add related target to dropdown

bump version also
  • Loading branch information...
1 parent ea8cb9a commit fb20fe7e69cb2f9779b45d881ef7eb52b139a77c @JimBobSquarePants JimBobSquarePants committed Dec 16, 2015
Showing with 11 additions and 11 deletions.
  1. +1 −1 bower.json
  2. +1 −1 package.json
  3. +8 −8 src/js/responsive.dropdown.js
  4. +1 −1 src/sass/partials/_copyright.scss
View
@@ -1,7 +1,7 @@
{
"name": "responsive",
"description": "A powerful, accessible, developer friendly framework for building responsive websites.",
- "version": "4.1.1",
+ "version": "4.1.2",
"homepage": "http://responsivebp.com",
"authors": [
"James South"
View
@@ -1,7 +1,7 @@
{
"name": "responsive",
"description": "A powerful, accessible, developer friendly framework for building responsive websites.",
- "version": "4.1.1",
+ "version": "4.1.2",
"keywords": [
"html",
"css",
@@ -67,14 +67,14 @@
"tabindex": 0
});
- if (this.$parent){
-
+ if (this.$parent) {
+
// We're save to add the attribute here since if it's not used then
// data-api is disabled.
this.$element.attr({
"data-dropdown-parent": this.options.parent
});
-
+
}
this.$target.attr({
@@ -134,7 +134,7 @@
this.$target[dimension](size || "");
- this.transition("removeClass", $.Event(eshow), eshown);
+ this.transition("removeClass", $.Event(eshow, { relatedTarget: this.options.target }), eshown);
if ($actives && $actives.length) {
$.each($actives, function () {
@@ -166,7 +166,7 @@
this.$target.removeClass("expand");
this.$target[dimension](0);
- this.transition("addClass", $.Event(ehide), ehidden);
+ this.transition("addClass", $.Event(ehide, { relatedTarget: this.options.target }), ehidden);
};
Dropdown.prototype.toggle = function () {
@@ -186,7 +186,7 @@
complete = function () {
// The event to expose.
- var eventToTrigger = $.Event(completeEvent);
+ var eventToTrigger = $.Event(completeEvent, { relatedTarget: self.options.target });
// Ensure the height/width is set to auto.
self.$target.removeClass("trans")[self.options.dimension]("");
@@ -259,7 +259,7 @@
}
var $parent = this.options.parent ? $this.closest("[role=tablist]") : $this.closest(".accordion"),
- $items = $parent.find(" > [role=presentation] > [role=presentation]").children("[role=tab]"),
+ $items = $parent.find("[data-dropdown-parent=\"" + this.options.parent + "\"]").children("[role=tab]"),
index = $items.index($items.filter(":focus")),
length = $items.length;
@@ -331,4 +331,4 @@
w.RESPONSIVE_DROPDOWN = true;
-}(jQuery, window, ".r.dropdown", ".data-api"));
+}(jQuery, window, ".r.dropdown", ".data-api"));
@@ -6,4 +6,4 @@
Licensed under the MIT License.
============================================================================== */
-/*! Responsive v4.1.1 | MIT License | responsivebp.com */
+/*! Responsive v4.1.2 | MIT License | responsivebp.com */

0 comments on commit fb20fe7

Please sign in to comment.