templates/frontend/javascript.html.twig line 1

Open in your IDE?
  1. <script src="{{ asset('frontend/js/jquery.min.js') }}"></script>
  2. <script src="{{ asset('frontend/js/bootstrap.min.js') }}"></script>
  3. <script src="{{ asset('frontend/js/main.js') }}"></script>
  4. <script src="{{ asset('frontend/slick/slick.js') }}"></script>
  5. <script src="{{ asset('frontend/select2/select2.js') }}"></script>
  6. <script src="{{ asset('frontend/sweetalert2/sweetalert2.all.min.js') }}"></script>
  7. <script src="https://kit.fontawesome.com/8031cd8b80.js" crossorigin="anonymous"></script>
  8. <script>
  9.     $(function (){
  10.         Src.Init();
  11.     })
  12. </script>
  13. <script>
  14.     $('.slider').slick({
  15.         slidesToShow: 3,
  16.         slidesToScroll: 1,
  17.         autoplay: true,
  18.         autoplaySpeed: 2000,
  19.     responsive: [
  20.     {
  21.         breakpoint: 768,
  22.         settings: {
  23.         arrows: false,
  24.         centerMode: true,
  25.         centerPadding: '40px',
  26.         slidesToShow: 1
  27.         }
  28.     },
  29.     {
  30.         breakpoint: 480,
  31.         settings: {
  32.         arrows: false,
  33.         centerMode: true,
  34.         centerPadding: '40px',
  35.         slidesToShow: 1
  36.         }
  37.     }],
  38.     prevArrow:"<button type='button' class='slick-prev pull-left'><i class='fa fa-angle-left' aria-hidden='true'></i></button>",
  39.     nextArrow:"<button type='button' class='slick-next pull-right'><i class='fa fa-angle-right' aria-hidden='true'></i></button>"
  40.     });
  41. </script>
  42. <script>
  43.     $('.slider-notplay').slick({
  44.         infinite: true,
  45.         slidesToShow: 1,
  46.         slidesToScroll: 1,
  47.     responsive: [
  48.     {
  49.         breakpoint: 768,
  50.         settings: {
  51.         arrows: false,
  52.         centerMode: true,
  53.         centerPadding: '40px',
  54.         slidesToShow: 1
  55.         }
  56.     },
  57.     {
  58.         breakpoint: 480,
  59.         settings: {
  60.         arrows: false,
  61.         centerMode: true,
  62.         centerPadding: '40px',
  63.         slidesToShow: 1
  64.         }
  65.     }],
  66.     prevArrow:"<button type='button' class='slick-prev pull-left'><i class='fa fa-angle-left' aria-hidden='true'></i></button>",
  67.     nextArrow:"<button type='button' class='slick-next pull-right'><i class='fa fa-angle-right' aria-hidden='true'></i></button>"
  68.     });
  69. </script>
  70. <script>
  71.     $('.slider-notplay3').slick({
  72.         infinite: true,
  73.         slidesToShow: 3,
  74.         slidesToScroll: 1,
  75.     responsive: [
  76.     {
  77.         breakpoint: 768,
  78.         settings: {
  79.         arrows: false,
  80.         centerMode: true,
  81.         centerPadding: '40px',
  82.         slidesToShow: 1
  83.         }
  84.     },
  85.     {
  86.         breakpoint: 480,
  87.         settings: {
  88.         arrows: false,
  89.         centerMode: true,
  90.         centerPadding: '40px',
  91.         slidesToShow: 1
  92.         }
  93.     }],
  94.     prevArrow:"<button type='button' class='slick-prev pull-left'><i class='fa fa-angle-left' aria-hidden='true'></i></button>",
  95.     nextArrow:"<button type='button' class='slick-next pull-right'><i class='fa fa-angle-right' aria-hidden='true'></i></button>"
  96.     });
  97. </script>
  98. <script>
  99.     $(document).ready(function() {            
  100.     $(".select21").select2();
  101.     });
  102. </script> 
  103. <script>
  104.     $(document).ready(function() {            
  105.         $(".select2").select2({
  106.             allowClear: true,
  107.             
  108.         });
  109.     });
  110. </script>
  111. <script type="text/javascript">
  112.     $(function(){
  113.         
  114.         $('body').on('show.bs.modal', '.modal', function(event) {
  115.             $(this).find(".modal-content").load(event.relatedTarget.href);
  116.         });
  117.         
  118.         $('body').on('hidden.bs.modal', '.modal', function(event) { 
  119.             $(this).find(".modal-content").html('<div style="text-align: center"><img src="{{ asset('bundles/greenadmin/img/loading.gif') }}" style="width: 20px"/></div>');
  120.         });
  121.     });
  122. </script>
  123. <script>
  124.     function openCity(evt, cityName) {
  125.         var i, tabcontent, tablinks;
  126.         tabcontent = document.getElementsByClassName("tabcontent");
  127.         for (i = 0; i < tabcontent.length; i++) {
  128.         tabcontent[i].style.display = "none";
  129.         }
  130.         tablinks = document.getElementsByClassName("tablinks");
  131.         for (i = 0; i < tablinks.length; i++) {
  132.         tablinks[i].className = tablinks[i].className.replace(" active", "");
  133.         }
  134.         document.getElementById(cityName).style.display = "block";
  135.         evt.currentTarget.className += " active";
  136.     }
  137.     
  138.     // Get the element with id="defaultOpen" and click on it
  139.     // document.getElementById("defaultOpen").click();
  140. </script>
  141. <script>
  142.     /* When the user clicks on the button, 
  143.     toggle between hiding and showing the dropdown content */
  144.     function dropDown() {
  145.         document.getElementById("myDropdown").classList.toggle("show");
  146.     }
  147.     // Close the dropdown if the user clicks outside of it
  148.     window.onclick = function(event) {
  149.     if (!event.target.matches('.dropbtn')) {
  150.         var dropdowns = document.getElementsByClassName("dropdown-content");
  151.         var i;
  152.         for (i = 0; i < dropdowns.length; i++) {
  153.             var openDropdown = dropdowns[i];
  154.             if (openDropdown.classList.contains('show')) {
  155.                 openDropdown.classList.remove('show');
  156.             }
  157.         }
  158.     }
  159.     }
  160. </script>
  161. <script>
  162.     {% for message in app.flashes('notice') %}
  163.         $( document ).ready(function() {
  164.             Swal.fire({
  165.                 icon: 'success',
  166.                 title: 'Berhasil Dikirim',
  167.                 text: 'Terima Kasih',
  168.                 showConfirmButton: false,
  169.                 timer: 2000
  170.             });
  171.         });
  172.     {% endfor %}
  173. </script>