jQuery: Uncaught TypeError: url.indexOf is not a function

I got the “url.indexOf and e.indexOf is not a function” errors on my website. I got this error after my upgrade to my Magento webshop, but this error can happen on any website with a jQuery version upgrade. Error: Uncaught TypeError: e.indexOf is not a function at w.fn.load (jquery-3.3.1.min.js:2:82468) at caribbean-montego-mntgo-shell:1483:19 at Object.execCb (require.js:1696:33) at … Read more

Magento 2: Show Calendar/DatePicker & Date-Range Field in Custom Form

This article shows how you can add a calendar or date-picker field in any custom form in Magento 2. I will be showing three different ways of adding date picker in the template file (.phtml) in Magento 2. 1) using calendar widget 2) using datepicker widget 3) using datetimepicker widget I will also show how … Read more

jQuery: Calculate total price amount on Multiple Checkbox & Radio button selection

Scenario: I have different checkboxes and radio buttons. The checkboxes and radio buttons have some price value associated with them. Upon checking them I have to calculate the total price and display it in a textbox. Solution: We’ll use jQuery for this scenario. Here’s an example HTML to create checkbox and radio buttons. Checkboxes are … Read more

Magento: Add jQuery tabs in CMS page

You can add tabs in a CMS page in Magento. I have used jQueryUI tabs for this purpose. You can view the examples and source code of the tabs feature here: http://jqueryui.com/tabs/ Here is the step-by-step guide to create tabs on Magento CMS page:- 1. Create a CMS page (CMS -> Pages -> Add New … Read more

Magento jQuery: How to use them together?

By default, Magento contains and uses the Prototype javascript library. You can also integrate the other most popular javascript library ‘jQuery‘ in your Magento site. While integrating jQuery in Magento, you might get some javascript conflict and errors as you will be using two javascript libraries (prototype and jQuery) at a time. This is caused … Read more

Using jQuery & AJAX: Populate Selection List

In this tutorial, I will be showing how you can use AJAX with jQuery. From jQuery, you can send values to php page as GET or POST parameters. You can use load() function OR ajax() function of jQuery to accomplish the AJAX functionality. View Demo || Download Code In the example below, I will show … Read more

jQuery: Grey out background and preview image as popup

Here, I will show you how to preview Image with grey out background effect. I mean, you will be able to preview large image when you click the thumbnail image. The background of the page will be greyed and the image will be displayed as popup. View Demo || Download Code The following code will … Read more