foundation / foundation-sites

The most advanced responsive front-end framework in the world. Quickly create prototypes and production code for sites that work on any kind of device.
https://get.foundation
MIT License
29.67k stars 5.48k forks source link

Custom dropdown error when performing click event on dropdown item #2579

Closed emilhem closed 11 years ago

emilhem commented 11 years ago

Using latest Foundation (4.2.2) in FF.

When issuing the click event on a dropdown item this error occurs:

Error: Syntax error, unrecognized expression: :not([data-customforms="disabled"])) xxx/foundation.forms.js Line 153

This problem is not present in 4.1.6. (I double checked)

My JavaScript that "found/causes" this error:

$("#admin").next().find("li:eq("+msg.admin+")").click();
$("#workplace_id").next().find("li:contains('"+$("#workplace_id").find("[value='"+msg.workplace_id+"']").text()+"')").click();
dragonee commented 11 years ago

Similar under the latest Chrome, Foundation 4.2.2 with jQuery 1.9.1, 1.10.1 and 2.0.2.

I found that there is one closing parenthesis too much in the line 66 of foundation.js:

 66           if (!$(this).not('[data-customforms="disabled"])')) return;

Removing it fixes the error.

cKehres commented 11 years ago

Thanks, this hint works!

mrpatricko commented 11 years ago

Thanks!

fergardi commented 11 years ago

Yes, fixed. Thank you.

cKehres commented 11 years ago

seems to be fixed in 4.2.3

emilhem commented 11 years ago

Indeed it is. I'll close it.