// jQuery
$(document).ready(function() {
// code
})
This file contains hidden or 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
| // Get the template HTML and remove it from the doument. | |
| var previewNode = document.querySelector("#template"); | |
| previewNode.id = ""; | |
| var previewTemplate = previewNode.parentNode.innerHTML; | |
| previewNode.parentNode.removeChild(previewNode); | |
| var myDropzone = new Dropzone(document.body, { // Make the whole body a dropzone | |
| url: "/target-url", // Set the url | |
| thumbnailWidth: 80, | |
| thumbnailHeight: 80, |
This file contains hidden or 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
| {# Get the categories related to my "entrySection" entries in structure order #} | |
| {% set entries = craft.entries.section('entrySection') %} | |
| {% set relatedCats = craft.categories.relatedTo(entries) %} | |
| {# Loop the categories #} | |
| {% for category in relatedCats %} | |
| {{ category.title }} | |
| {# Get and loop through entries related to this cat #} |
This file contains hidden or 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
| class EventCatcher | |
| { | |
| /** | |
| * @var array | |
| */ | |
| protected $classConstants = []; | |
| public function __invoke(yii\base\Event $event) | |
| { |
This file contains hidden or 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
| var lastLogoUrl = '{{route('storage.companies.logo', ['file' => basename($cmpny->logo)])}}'; | |
| {{-- var isLogoUpdated = false; --}} | |
| var updatedData = null; | |
| var oldData = null; | |
| var form = null; | |
| var dataToSend = null; |
This file contains hidden or 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
| Official SubReddit: https://www.reddit.com/r/Spotifyhosts/ | |
| FOLLOW DOWN | |
| | | | |
| | | | |
| \ | / \ | / | |
| \|/ \|/ |
This file contains hidden or 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
| // helpers.js | |
| const loadSingleEntryPoint = ({ | |
| // Elements selectors | |
| els = [], | |
| // Execute something before the actual load of the module | |
| beforeLoad = (el) => {}, | |
| // Perform module load & return a Promise |
This file contains hidden or 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 'shop/_layouts/main' %} | |
| {% block main %} | |
| {{ sprig('product_content', {productId: product.id}) }} | |
| {{ sprig.script }} | |
| {% endblock %} |
This file contains hidden or 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
| document.addEventListener('DOMContentLoaded', (event) => { | |
| // Find all oembed elements | |
| const oembedElements = document.querySelectorAll('oembed[url]'); | |
| oembedElements.forEach(element => { | |
| const url = element.getAttribute('url'); | |
| let videoId: string | null; | |
| if (!url) return; | |
| videoId = extractYouTubeId(url); |
OlderNewer