magefan s
Author: Jerin
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.
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?
When the tab is switching, how do I uncheck a check box using Jquery?
document.getElementById(‘paidli’).onclick = function() { $(‘input:checkbox’).prop(‘checked’,false); checkboxes.prop(‘checked’,false); } We can set the checked status to false using props.
How to Create Custom 404 Page in Magento 2 ?
4 Steps to Create Custom 404 page in Magento 2 Step 1: Access Your Magento Admin Panel Step 2: Find The 404 Not Found Edit Page Step 3: Edit The Default 404 Not Found Page Step 4: Click To The Save Button Step 1: Access Your Magento Admin Panel From the Admin panel, navigate to… Continue reading How to Create Custom 404 Page in Magento 2 ?
How to get data from the database table by MySQL query in 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?
A simple disclosure example.
This example shows a simple <details> element with a <summary>.
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/
How can I prevent the page from submitting when I click a tab?
So instead of, It should be: You can also remove onsubmit=”return false;” as it is no longer necessary.