There are two ways to get current product in Magento 2. Using custom block class extended from Magento\Catalog\Block\Product\AbstractProduct Using…
Magento 2 shipped with a new concept of dependency injection where dependent objects, classes are passed as arguments…
In jQuery we can prefix variables that contain a jQuery object with a $, so that they are easily…
We can make Ajax post call using few different ways; Method 1: jQuery.ajax({ … }); var…
In jQuery, we can check if a textarea is empty or not using the following code: var…
var element = $(“label:contains(‘SuperSweetCheckbox’)”);
In jQuery, we can use the direct descendant selector > $(‘#test-id > p:first’) or even children() $(‘#test-id’).children(‘p’).first()
To remove extra spaces from a string $string = preg_replace(‘/\s+/’, ‘ ‘, $stringWithSpaces);
A good development environment is always necessary for any Magento 2 developers. Take a look at the…