Query Selector

The querySelector() method returns the first element that matches a CSS selector. To return all matches (not only the first), use the querySelectorAll() instead. Both querySelector() and querySelectorAll() throw a SYNTAX_ERR exception if the selector(s) is invalid.

Published
Categorized as Magento

How to disable source code, control u,v, and inspect sections using jQuery?

inspect disable $(document).bind(“contextmenu”,function(e) {e.preventDefault(); }); disable f12$(document).keydown(function (event) {if (event.keyCode == 123) { // Prevent F12return false;} else if (event.ctrlKey && event.shiftKey && event.keyCode == 73) { // Prevent Ctrl+Shift+Ireturn false;}}); disable ctl+u jQuery(document).ready(function($){$(document).keydown(function(event) {var pressedKey = String.fromCharCode(event.keyCode).toLowerCase(); if (event.ctrlKey && (pressedKey == “c” || pressedKey == “u”)) {// alert(‘Sorry, This Functionality Has Been Disabled!’);//disable… Continue reading How to disable source code, control u,v, and inspect sections using jQuery?

Published
Categorized as Magento

How to Resolve Incorrect Captcha settings in store front?

Steps to Configure a Storefront CAPTCHA in Magento 2 Please follow these steps to complete enabling a CAPTCHA at the storefront: On the Admin panel, click Stores. In the Settings section, select Configuration. Select Customer Configuration under Customers in the panel on the left Open the CAPTCHA section, and continue with following: In the Enable… Continue reading How to Resolve Incorrect Captcha settings in store front?

Published
Categorized as Magento

Disabling submit button until all fields have values

var fields = “#user_input, #pass_input, #v_pass_input, #email”; $(fields).on(‘change’, function() {if (allFilled()) {$(‘#register’).removeAttr(‘disabled’);} else {$(‘#register’).attr(‘disabled’, ‘disabled’);}}); function allFilled() {var filled = true;$(fields).each(function() {if ($(this).val() == ”) {filled = false;}});return filled;} Reference:https://jsfiddle.net/chriscrowley/6fdxLkq0/

Published
Categorized as Magento