This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery(function($) { | |
// returns an array of the potential selector components for the first element in the jQuery object. IDs, classes, and tagNames only. | |
var getSelectorComponents = function($el) { | |
var components = []; | |
var id = $el.attr('id'); | |
if (typeof(id)!='undefined' && /[^\s]/.test(id)) { | |
components.push('#'+id); | |
} |