swal({ title: "You successfully made a question!", text: "Do you want to make another question, or do you wish to finish the test and make a course?", type: "success", showCancelButton: true, cancelButtonText: "Make another question!", confirmButtonColor: "#DD6B55", confirmButtonText: "Finish course!", allowEscapeKey: false, allowOutsideClick:false }, function(isConfirm){ if (isConfirm) { <?php $course = App\Course::findorFail($id); ?> window.location = "{{ url('/finish/'.$course->id) }}"; } }); </script> <script> $(document).ready(function(){ var x1=$('#button') x1.height(x1.width()%4) $(window).resize(function(){ x1.height(x1.width()%4) }); }); </script> @endif