I've been working on a project that uses namespaced attributes. I had thought, given that the bottom of the "selectors" documentation talks about escaping special characters so they can be used in selectors, that jquery at this point could handle such namespaced attributes. But it seems that it cannot---the enclosed html shows jquery failing to find a namespaced attribute. Am I wrong that jquery can handle namespaces? Or am I doing something else wrong? Is there some way I can efficiently get at a particular namespaces attribute?
<html> <head> <title>Test</title> <script src="http://jqueryjs.googlecode.com/files/ jquery-1.3.2.js"></script> </head> <body> <script> var node=$("<div><span></span></div>"); var child=node.children(); child.attr("ex:foobar","baz"); child.attr("foobar","baz"); alert("constructed this fragment: " + node.html()); var first = node.find("[foobar]"); alert("matches without namespace: " + first.length); first.each(function (i) {alert("without namespace: " + $(this).text ())}); var second = node.find("[ex\\:foobar]"); alert("matches with namespace: " + second.length); second.each(function (i) {alert("with namespace: " + $(this).text ())}); </script> </body> --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "jQuery Development" group. To post to this group, send email to jquery-dev@googlegroups.com To unsubscribe from this group, send email to jquery-dev+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/jquery-dev?hl=en -~----------~----~----~----~------~----~------~--~---