Модальное окно не открывается должным образом в шаблоне Laravel BladeJquery

Программирование на jquery
Ответить
Anonymous
 Модальное окно не открывается должным образом в шаблоне Laravel Blade

Сообщение Anonymous »


I have a Laravel Blade template where I'm trying to open a modal window on button click using jQuery. However, the modal window is not opening as expected, and I'm facing difficulties in identifying the issue.

@foreach($uniqueCountries as $country) {{ $country }} @php $uniqueCompanies = $project->where('country', $country)->pluck('company')->unique(); @endphp @foreach($uniqueCompanies as $companyIndex => $company) {{ $company }} {{ $project->where('country', $country)->where('company', $company)->first()->city }}
Детальніше @endforeach @foreach($uniqueCompanies as $companyIndex => $company) @php $vacancies = $project->where('country', $country)->where('company', $company); @endphp @foreach($vacancies as $vacancyIndex => $vacancy) {{ $vacancy->vacancy }}
{{ $vacancy->job }}
Створити PDF Редактор PDF ✖ Країна
Назва проекту\заводу
Створити і Переглянути PDF

Завантажити PDF @endforeach @endforeach @endforeach $(document).ready(function(){ // Ховаємо всі блоки крім блоків країн $('.country-block, .company-cards, .vacancy-card, .details-btn').hide(); $(document).on('click', '.country-card', function(){ var countryId = $(this).data('country'); // Ховаємо всі блоки крім блоків компаній в обраній країні $('.country-block').hide(); $('#'+countryId).show(); // Ховаємо всі блоки крім блоків компаній $('.company-cards').hide(); // Показуємо блок компаній в обраній країні $('#'+countryId+' .company-cards').show(); // Ховаємо всі блоки вакансій та кнопок "Детальніше" $('.details-btn').show(); }); $(document).on('click', '.details-btn', function(){ var index = $(this).data('index'); // Ховаємо всі блоки вакансій $('.vacancy-card').hide(); // Показуємо вакансії для обраної компанії $('.vacancy-card[data-index="'+index+'"]').show(); }); }); function openPDFEditor(vacancyId) { document.getElementById('pdfEditorModal_' + vacancyId).style.display = 'block'; } function closePDFEditor(vacancyId) { document.getElementById('pdfEditorModal_' + vacancyId).style.display = 'none'; }
I've ensured that jQuery is properly included before my custom script, and I've checked the syntax for any errors. Despite these precautions, the modal window doesn't display.


Источник: https://stackoverflow.com/questions/781 ... e-template
Ответить

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

Вернуться в «Jquery»