How to package this code into a plug-in that can be used in every page without having to write the same class name or ID name?

$(function(){
    var isBox = false;  
    $("-sharpselect").hide();   
      
    $("-sharpinput_select").focus(function () { 
      $(this).siblings("-sharpselect").show();   
      isBox = true;  
    });  
    $("-sharpmousemove").mousemove(function () {
      isBox = true;  
    });  
    $("-sharpmousemove").mouseout(function () { 
      isBox = false;  
    });  
    $("-sharpinput_select").blur(function () { 
      if (isBox == true) return false;  
      $("-sharpselect").hide();  
    });  
    $("-sharpselect").find("li").each(function () {  
      $(this).on("click", function () {  
        isBox = false;  
        var text = $(this).text();  
        $("-sharpinput_select").val(text);  
        $("-sharpselect").hide();  
      })  
    })
})
Mar.11,2021
Menu