Disabled functionality added #59

Merged
merged 4 commits into from Feb 20, 2017

Projects

None yet

2 participants

Contributor

resolves #17

jquery.dropdown.js
@@ -264,6 +264,9 @@
// Close opened dropdowns
$(".dropdownjs > ul > li").attr("tabindex", -1);
+ if (e.target.getAttribute('disabled')) {
FezVrasta
FezVrasta Feb 18, 2017 Owner

I would use jQuery to read the attribute to keep consistency.

corientdev
corientdev Feb 18, 2017 Contributor

Same thing is used at many places in script. I just copied it from above.

jquery.dropdown.js
@@ -264,6 +264,9 @@
// Close opened dropdowns
$(".dropdownjs > ul > li").attr("tabindex", -1);
+ if (e.target.getAttribute('disabled')) {
+ return;
FezVrasta
FezVrasta Feb 18, 2017 Owner

wrong indentation here, may you fix?

jquery.dropdown.js
@@ -384,6 +391,11 @@
$option.addClass("selected");
}
+ if ($this.prop("disabled")) {
+ $option.attr("disabled", true);
+ $option.addClass("disabled");
FezVrasta
FezVrasta Feb 18, 2017 Owner

Why do you need a class? It should be enough to use the :disabled CSS selector to style it I think?

corientdev
corientdev Feb 18, 2017 Contributor

I just copied selected thing from your own code.

@FezVrasta FezVrasta merged commit 5583fb6 into FezVrasta:master Feb 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment