Tuesday, March 21, 2017

Jquery Slider in Php / Laravel Blade

I need to use the variable $currentSliderCount, which holds the current slider value in the second statement of my for loop, instead of $chCount I want to pass $currentSliderCount how to accomplish this?

I use the jquery ui slider.

// filename = slider.blade.php

$currentSliderCount = $('#number_of_chapters').val();

for(var i = 0; i < $currentSliderCount; i++) {
    // php loop blade syntax
    @for ($i = 0; $i < $chCount; $i++)
        $('#sliderAppendNumCh').append('...');
    @endfor
}



via J.Alan

Advertisement