Commit 349ea196 authored by David_Rothstein's avatar David_Rothstein

Issue #1507954 by nod_, boombatower | silinor: Fixed Global selector in...

Issue #1507954 by nod_, boombatower | silinor: Fixed Global selector in states.js brakes some scripts.
parent 4d26c301
......@@ -16,10 +16,11 @@ var states = Drupal.states = {
*/
Drupal.behaviors.states = {
attach: function (context, settings) {
var $context = $(context);
for (var selector in settings.states) {
for (var state in settings.states[selector]) {
new states.Dependent({
element: $(selector),
element: $context.find(selector),
state: states.State.sanitize(state),
constraints: settings.states[selector][state]
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment