JSFiddle - React, Tailwind, and code Playground
by doug65536
HTML
<a>Hello</a>
<a>Hello</a>
JavaScript
$(function () {
(function ($) {
"use strict";
function capitalize() {
return this.each(function () {
var element = $(this);
element.text(element.text().toUpperCase());
});
}
function emergency() {
return this.each(function () {
var element = $(this);
element.css({
'background': 'red',
'color': 'white',
'font-weight': 'bold',
'padding': '16px'
});
});
}
$.fn.capitalize = capitalize;
$.fn.emergency = emergency;
}(jQuery));
$('a').capitalize().emergency();
});