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
| <div class="quantity"> | |
| <button type="button" id="add" class="add">+</button> | |
| <input type="number" value="0" class="input-text qty text" /> | |
| <button type="button" id="sub" class="sub">-</button> | |
| </div> | |
| $('.add').on('click', function (){ | |
| var curVal = +$(this).parent().find('input').val(); | |
| $(this).parent().find('input').val(curVal + 1); | |
| }); |
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 productColorSlider = $("#product-color-slider").find('.owl-carousel'); | |
| productColorSlider.on('initialized.owl.carousel', function(property) { | |
| // its important to place initialized.owl.carousel before attaching owl-carousel | |
| var current = property.item.index; | |
| var prev = $(property.target).find(".owl-item").eq(current).prev().find("img").attr('src'); | |
| var next = $(property.target).find(".owl-item").eq(current).next().find("img").attr('src'); | |
| $('.navPrev').find('img').attr('src', prev); | |
| $('.navNext').find('img').attr('src', next); | |
| }); |
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", function(){ | |
| document.getElementById('id-of-select-box').addEventListener('change', function(e){ | |
| switch(e.target.value){ | |
| case 'Desirable option-value here': | |
| document.getElementById('id-of-the-target-element').getElementsByClassName('class-of-the-target-element')[0].classList.add('hidden'); | |
| break; | |
| default: | |
| document.getElementById('id-of-the-target-element').getElementsByClassName('class-of-the-target-element')[0].classList.remove('hidden'); | |
| } | |
| }) |
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
| /* preserve color */ | |
| -webkit-print-color-adjust: exact; |
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 scrollTop = (window.pageYOffset !== undefined) ? window.pageYOffset : (document.documentElement || document.body.parentNode || document.body).scrollTop; | |
| /* using jquery */ | |
| var scrollTop = $(window).scrollTop() |
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
| if(window.innerWidth < 768) |
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
| <div class="checkbox"> | |
| <label class="checked"> | |
| <input type="checkbox""> | |
| Implementation | |
| </label> | |
| </div> | |
| .checkbox input[type="checkbox"]{ | |
| display: none; | |
| } |
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 maxHeight = Math.max.apply(null, jQuery(".section.resources-page .webinar >div").map(function () | |
| { | |
| return jQuery(this).height(); | |
| }).get()); |
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
| myArray.filter(x => x.id === '45') | |
| // it returns array with an object if its find matching object |
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
| <span class="wpcf7-form-control wpcf7-radio"> | |
| <span class="wpcf7-list-item"> | |
| <label class=""> | |
| <input type="radio" value="Yes"> | |
| <span class="wpcf7-list-item-label">Yes</span> | |
| </label> | |
| </span> | |
| </span> | |