Right so I'm creating a plugin using jquery what I have thus far is this. .
(function ($) {
$.fn.AppCompFunctionality = function () {
var defaults = {
};
var options = $.extend(defaults, options);
return this.each(function () {
$(this).click(function () {
var currentComps = $("#currentComps").get();
$(currentComps).hide();
});
});
};
})(jQuery);
now suppose currentComps is a Unordered List that has list items inside say
<ul id="currentComps">
<li id="CompName">
Component Name:
</li>
<li id="CompVersion">
Component Version:
</li>
</ul>
I want to get the list item with the id say 'CompName' only, how would i retrieve this through a plugin. . going through currentComps as full object i get -
I dont want to be able to select CompName using eq() either I want to be able to select is by its id but through CurrentComps if that makes any sense.