Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Fix objs when given a dom id #24

Closed
wants to merge 1 commit into from

2 participants

@jadahl

Without this fix wf:update("#id", Something) would try to add Something to what jQuery(".wfid_#id") would find. This small fix avoids adding the .wfid_ prefix not only when there is a "." or a " " in the path, but also a "#".

@choptastic choptastic closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jan 9, 2011
  1. @jadahl
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  apps/nitrogen/www/nitrogen.js
View
2  apps/nitrogen/www/nitrogen.js
@@ -226,7 +226,7 @@ function objs(path, anchor) {
path = path.replace(/\bme\b/g, anchor);
// If this is a single word, then rewrite it to a Nitrogen element id.
- if (path.indexOf(" ") == -1 && path.indexOf(".") == -1) {
+ if (path.indexOf(" ") == -1 && path.indexOf(".") == -1 && path.indexOf("#") == -1) {
var results = objs(".wfid_" + path, anchor);
// If we found results, then return them...
Something went wrong with that request. Please try again.