Incremtal value changes for slider

jQuery(document).ready(function(){
jQuery(’#estimation_popup [data-itemid=264]’).slider(‘option’,‘step’,0.5);
});

Looking to make a slider that goes in increments of 0.5, 1, 1.5…up to 5 then after that in increments of 1…5, 6, 7…

What do I need to add?

not good with jQuery, but maybe something like:

jQuery(document).ready(function(){
let sliderIncrement = (){
          return jQuery('#estimation_popup [data-itemid=264]').value < 5 // complete guess here
          ? 0.5
          : 1
};
jQuery('#estimation_popup [data-itemid=264]').slider('option','step', sliderIncrement);
});

I am probably way off, but my thought is to get the step value from a function. If < 5 use .5 steps, else use 1 steps.