use JQuery in Laravel Blade loop

Solution:1

Try this :

@for($i=0; $i<3; $i++)
  <button class="button-list" custom-value="{{ $i }}"></button>
@endfor

<script>
  $( ".button-list" ).click(function() {
    var custom_value = $(this).attr('custom-value');
    alert(custom_value);
  });
</script>
...

Solution:2

You made a mistake of quotation near id and to pass the value of same id I used the java script function and then accessed the value inside it.

@for($i=0; $i<3; $i++)
<button id="something-{{ $i }}" onclick="doSomething({{ $i }})"></button>
@endfor

<script>
function doSomething(value) {
    $.( "#something-"+value ).click(function() {
        alert( "Hello" );
    });
}
</script>