Suppose I have a simple XHTML document that uses a custom namespace for attributes:
jQuery does not support custom namespaces directly, but you can find the divs you are looking for by using filter function.
// find all divs that have custom:attr
$('div').filter(function() { return $(this).attr('custom:attr'); }).each(function() {
// matched a div with custom::attr
$(this).html('I was found.');
});