• Resolved mircearenea

    (@mircearenea)


    https://cff.dwbooster.com/documentation#assign-slider-value-programmatically

    “..includes instructions about how to assign values to the slider controls programmaticaly.”

    and work great. Thank you !! but, at the same time, I need to modify max prop. of the same slider.

    —————–
    From your T&T:

    <SCRIPT>
    function setSliderValue( clss, value )
    {
    var id = fbuilderjQuery(‘.’+clss+’ input’).attr( ‘id’ );
    var fId = id.match(/_\d+$/);
    fbuilderjQuery.fbuilder.forms[fId].getItem(id).setVal(value);
    }
    </SCRIPT>

    Thank you again!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter mircearenea

    (@mircearenea)

    Or, to be, more explicit I need something like that:
    function()
    {…….

    if (x<10000 && y>=36)
    {
    setSliderValue(‘luni1’,36);
    setSlidermax(‘luni1’,36);
    //$(“.luni1”)
    // .prop({
    // min: 1,
    // max: 36,
    // value: 36
    //})
    // .slider(“refresh”);
    }

    Plugin Author codepeople

    (@codepeople)

    Hello @mircearenea,

    The function would be similar to:

    function setSliderValue( clss, value, min, max )
    {
    var id = fbuilderjQuery('.'+clss+' input').attr( 'id' );
    var fId = id.match(/_\d+$/);
    fbuilderjQuery.fbuilder.forms[fId].getItem(id).setVal(value);
    fbuilderjQuery('#'+fID+'_slider').slider({'min': min, 'max': max});
    }

    Pay attention to the piece of code below to define the min and max that are passed as parameter to the function setSliderValue:

    fbuilderjQuery('#'+fID+'_slider').slider({'min': min, 'max': max});

    If you need additional help implementing your project, I can offer you a custom coding service from my private website:

    https://cff.dwbooster.com/customization

    Best regards.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to make slider presets – Reloaded’ is closed to new replies.