New to jQuery - Trying to build basic Plugin

Hello - Just trying to build a basic plugin (below) to see how it works and when I try to call “listElements” from
my main page I get “Object doesn’t support this property or method”. Below is ‘Plugin code’ which I have in separate include & ‘calling’ code from test page.
Thanks…

<script src='../../foundation/javascripts/jquery.DN_JScript.js'> type="text/javascript"></script>

(function ($) {
// Shell for your plugin code
jQuery.fn.listElements = function () {
return this.each(function () {
alert(‘SRC script/Tag Name:"’ + $(this).attr(“name”) + ‘".’);
});
}

//$(document).ready(function () {
//    $("input").listElements();
//    $("p").listElements();
//});
alert("PLUGIN - list Elements");

})(jQuery);

$(document).ready(function () {
alert(“Page call for PLUGIN - ListElement”);
$(“input”).listElements();
$(“p”).listElements();
});

Hi dnendza and welcome to SitePoint,

I have tested your code and it works as expected, can you please ensure the file isn’t failing to load as it sounds like that is happening in your case.