Support for incomplete path.
Refactored to support jQuery 1.9.