Jquery

window.$("document").ready(function () {
  window.$("-sharpul5 a").on("click", function () {
    window.$(this).css("fontSize", "20px")
  })
})

I want to implement that the default font size is 16px, and then the font of the element clicked becomes larger. When you click on other elements at random, the font you clicked on last time is restored to 16PX, and you can"t write it with jq. Ask the great god for advice.

Mar.04,2021

try

:fontchange
$('document').ready(function () {
  $('.fontchange').on('click', function () {
    $('.fontchange').css('fontSize', '16px'); // 
    $(this).css('fontSize', '20px');    // 
  })
})
Menu