This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
document.querySelectorAll('input[type="file"]').forEach((el, index) => { | |
el.onchange = e => { | |
const file = e.target.files[0]; | |
if ( file ) { | |
el.closest('div[class*="col-md"]') | |
.querySelector('img').src = URL.createObjectURL(file); | |
} | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const slugInput = document.querySelector('form input[name="slug"]'); | |
const slugText = slugInput.value; | |
var slugInputIsEdit = false; | |
slugInput.onchange = (e) => { | |
slugInputIsEdit = true; | |
} | |
document.querySelector('form input[name="name"]').onkeyup = (e) => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang=""> | |
<head> | |
<meta charset="utf-8"> | |
<title>JavaScript cloneNode() Demo</title> | |
</head> | |
<body> | |
<ul id="menu"> | |
<li>Home</li> | |
<li>Services</li> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<img src="{{ $vendor->image }}" onerror="ImgError(this)"> | |
<script type="text/javascript"> | |
function ImgError(source){ | |
source.src = 'http://bbb.test/assets/images/placeholder.png'; | |
source.onerror = ""; | |
return true; | |
} | |
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.addEventListener("DOMContentLoaded", () => { | |
// DOM ready! Images, frames, and other subresources are still downloading. | |
var myModal = new bootstrap.Modal(document.getElementById('exampleModal')) | |
myModal.toggle() | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@extends('layouts.merchant') | |
@section('css') | |
<style> | |
body { | |
font-family: sans-serif; | |
} | |
a { | |
color: #369; |
NewerOlder