Separacion de js a archivos por pagina
This commit is contained in:
@ -53,19 +53,15 @@
|
||||
<link rel="stylesheet" type="text/css" href="{{$urls->styles}}/evento.css" />
|
||||
@endpush
|
||||
|
||||
@push('scripts')
|
||||
<script type="text/javascript">
|
||||
var media = [
|
||||
@foreach ($imagenes as $media)
|
||||
'{!!$media->media->html!!}',
|
||||
@endforeach
|
||||
]
|
||||
$(document).ready(function() {
|
||||
$('.imagen').css('cursor', 'pointer').click(function() {
|
||||
var id = $(this).attr('data-id')
|
||||
var src = media[id]
|
||||
$('#seleccionada').html(src)
|
||||
})
|
||||
})
|
||||
</script>
|
||||
@push('readyjs')
|
||||
let media = [
|
||||
@foreach ($imagenes as $media)
|
||||
'{!!$media->media->html!!}',
|
||||
@endforeach
|
||||
]
|
||||
$('.imagen').css('cursor', 'pointer').click(function() {
|
||||
var id = $(this).attr('data-id')
|
||||
var src = media[id]
|
||||
$('#seleccionada').html(src)
|
||||
})
|
||||
@endpush
|
||||
|
Reference in New Issue
Block a user