dreamerslab/jquery.actual — pull request #11 by jacobq (2013-07-19 15:55:57+00:00)
Title: Detect presence of $.fn.addBack function instead of jQuery version

To determine whether or not the deprecated jQuery function "andSelf" should be used instead of "addBack" the code used to check if the jQuery version string was >= "1.8.0" since that is the point where the old function was deprecated. However, string comparisons will not yield the desired result when comparing numbers consisting of a different number of digits. Rather than make the version comparison more complex to compensate for this I have changed the condition to check for the presence of the newer function and use it if it is defined. This seems to better fit the spirit of "feature detection" vs "browser/framework detection"