jQueryplugin.html
<!DOCTYPE html>
<html>
<head>
<title>How to Create a Jquery Plugin</title>
<script src="http://code.jquery.com/jquery-1.11.2.min.js"></script>
<script src="jquery.yourPluginName.js"></script>
<script>
$(function() {
$("h1").yourfunctionName();
});
</script>
</head>
<body>
<h1>Happy New Year 2015</h1>
</body>
</html>
jquery.yourPluginName.js
jQuery.fn.yourfunctionName = function () {
this.each(function () {
$(this).css("text-shadow", "1px 2px 3px orange");
});
return this;
}
OUTPUT:jQuery Plugin
